OSDN Git Service

2004-08-30 Phil Edwards <phil@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / libgfortran / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 ## We like to use C99 routines when available.  This makes sure that
4 ## __STDC_VERSION__ is set such that libc includes make them available.
5 AM_CFLAGS = -std=gnu99
6
7 toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
8
9 libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm
10
11 ## This should really go in the compiler lib dir, not the system lib dir.
12 libgfortranbegin_la_SOURCES = fmain.c
13 libgfortranbegin_la_LDFLAGS = -static
14
15 AM_CPPFLAGS = -I$(srcdir)/io
16
17 libgfortranincludedir = $(includedir)/gforio
18
19 gfor_io_src= \
20 io/backspace.c \
21 io/close.c \
22 io/endfile.c \
23 io/format.c \
24 io/inquire.c \
25 io/list_read.c \
26 io/lock.c \
27 io/open.c \
28 io/read.c \
29 io/rewind.c \
30 io/transfer.c \
31 io/unit.c \
32 io/unix.c \
33 io/write.c
34
35 gfor_io_headers= \
36 io/io.h
37
38 gfor_helper_src= \
39 intrinsics/associated.c \
40 intrinsics/abort.c \
41 intrinsics/args.c \
42 intrinsics/bessel.c \
43 intrinsics/c99_functions.c \
44 intrinsics/cpu_time.c \
45 intrinsics/cshift0.c \
46 intrinsics/date_and_time.c \
47 intrinsics/env.c \
48 intrinsics/erf.c \
49 intrinsics/eoshift0.c \
50 intrinsics/eoshift2.c \
51 intrinsics/etime.c \
52 intrinsics/getXid.c \
53 intrinsics/ishftc.c \
54 intrinsics/pack_generic.c \
55 intrinsics/size.c \
56 intrinsics/spread_generic.c \
57 intrinsics/string_intrinsics.c \
58 intrinsics/rand.c \
59 intrinsics/random.c \
60 intrinsics/reshape_generic.c \
61 intrinsics/reshape_packed.c \
62 intrinsics/selected_kind.f90 \
63 intrinsics/system_clock.c \
64 intrinsics/transpose_generic.c \
65 intrinsics/unpack_generic.c \
66 runtime/in_pack_generic.c \
67 runtime/in_unpack_generic.c \
68 runtime/normalize.c
69
70 gfor_src= \
71 runtime/environ.c \
72 runtime/error.c \
73 runtime/main.c \
74 runtime/memory.c \
75 runtime/pause.c \
76 runtime/stop.c \
77 runtime/string.c \
78 runtime/select.c \
79 gfortypes.h \
80 libgfortran.h
81
82 i_all_c= \
83 generated/all_l4.c \
84 generated/all_l8.c
85
86 i_any_c= \
87 generated/any_l4.c \
88 generated/any_l8.c
89
90 i_count_c= \
91 generated/count_4_l4.c \
92 generated/count_8_l4.c \
93 generated/count_4_l8.c \
94 generated/count_8_l8.c
95
96 i_maxloc0_c= \
97 generated/maxloc0_4_i4.c \
98 generated/maxloc0_8_i4.c \
99 generated/maxloc0_4_i8.c \
100 generated/maxloc0_8_i8.c \
101 generated/maxloc0_4_r4.c \
102 generated/maxloc0_8_r4.c \
103 generated/maxloc0_4_r8.c \
104 generated/maxloc0_8_r8.c
105
106 i_maxloc1_c= \
107 generated/maxloc1_4_i4.c \
108 generated/maxloc1_8_i4.c \
109 generated/maxloc1_4_i8.c \
110 generated/maxloc1_8_i8.c \
111 generated/maxloc1_4_r4.c \
112 generated/maxloc1_8_r4.c \
113 generated/maxloc1_4_r8.c \
114 generated/maxloc1_8_r8.c
115
116 i_maxval_c= \
117 generated/maxval_i4.c \
118 generated/maxval_i8.c \
119 generated/maxval_r4.c \
120 generated/maxval_r8.c
121
122 i_minloc0_c= \
123 generated/minloc0_4_i4.c \
124 generated/minloc0_8_i4.c \
125 generated/minloc0_4_i8.c \
126 generated/minloc0_8_i8.c \
127 generated/minloc0_4_r4.c \
128 generated/minloc0_8_r4.c \
129 generated/minloc0_4_r8.c \
130 generated/minloc0_8_r8.c
131
132 i_minloc1_c= \
133 generated/minloc1_4_i4.c \
134 generated/minloc1_8_i4.c \
135 generated/minloc1_4_i8.c \
136 generated/minloc1_8_i8.c \
137 generated/minloc1_4_r4.c \
138 generated/minloc1_8_r4.c \
139 generated/minloc1_4_r8.c \
140 generated/minloc1_8_r8.c
141
142 i_minval_c= \
143 generated/minval_i4.c \
144 generated/minval_i8.c \
145 generated/minval_r4.c \
146 generated/minval_r8.c
147
148 i_sum_c= \
149 generated/sum_i4.c \
150 generated/sum_i8.c \
151 generated/sum_r4.c \
152 generated/sum_r8.c \
153 generated/sum_c4.c \
154 generated/sum_c8.c
155
156 i_product_c= \
157 generated/product_i4.c \
158 generated/product_i8.c \
159 generated/product_r4.c \
160 generated/product_r8.c \
161 generated/product_c4.c \
162 generated/product_c8.c
163
164 i_dotprod_c= \
165 generated/dotprod_i4.c \
166 generated/dotprod_i8.c \
167 generated/dotprod_r4.c \
168 generated/dotprod_r8.c 
169
170 i_dotprodl_c= \
171 generated/dotprod_l4.c \
172 generated/dotprod_l8.c
173
174 i_dotprodc_c= \
175 generated/dotprod_c4.c \
176 generated/dotprod_c8.c
177
178 i_matmul_c= \
179 generated/matmul_i4.c \
180 generated/matmul_i8.c \
181 generated/matmul_r4.c \
182 generated/matmul_r8.c \
183 generated/matmul_c4.c \
184 generated/matmul_c8.c
185
186 i_matmull_c= \
187 generated/matmul_l4.c \
188 generated/matmul_l8.c
189
190 i_transpose_c= \
191 generated/transpose_i4.c \
192 generated/transpose_i8.c
193
194 i_shape_c= \
195 generated/shape_i4.c \
196 generated/shape_i8.c
197
198 i_reshape_c= \
199 generated/reshape_i4.c \
200 generated/reshape_i8.c
201
202 i_eoshift1_c= \
203 generated/eoshift1_4.c \
204 generated/eoshift1_8.c
205
206 i_eoshift3_c= \
207 generated/eoshift3_4.c \
208 generated/eoshift3_8.c
209
210 i_cshift1_c= \
211 generated/cshift1_4.c \
212 generated/cshift1_8.c
213
214 in_pack_c = \
215 generated/in_pack_i4.c \
216 generated/in_pack_i8.c
217
218 in_unpack_c = \
219 generated/in_unpack_i4.c \
220 generated/in_unpack_i8.c
221
222 i_exponent_c = \
223 generated/exponent_r4.c \
224 generated/exponent_r8.c
225
226 i_fraction_c = \
227 generated/fraction_r4.c \
228 generated/fraction_r8.c
229
230 i_nearest_c = \
231 generated/nearest_r4.c \
232 generated/nearest_r8.c
233
234 i_set_exponent_c = \
235 generated/set_exponent_r4.c \
236 generated/set_exponent_r8.c
237
238 i_pow_c = \
239 generated/pow_i4_i4.c \
240 generated/pow_i8_i4.c \
241 generated/pow_r4_i4.c \
242 generated/pow_r8_i4.c \
243 generated/pow_c4_i4.c \
244 generated/pow_c8_i4.c \
245 generated/pow_i4_i8.c \
246 generated/pow_i8_i8.c \
247 generated/pow_r4_i8.c \
248 generated/pow_r8_i8.c \
249 generated/pow_c4_i8.c \
250 generated/pow_c8_i8.c
251
252 m4_files= m4/iparm.m4 m4/ifunction.m4 m4/iforeach.m4 m4/all.m4 \
253     m4/any.m4 m4/count.m4 m4/maxloc0.m4 m4/maxloc1.m4 m4/maxval.m4 \
254     m4/minloc0.m4 m4/minloc1.m4 m4/minval.m4 m4/product.m4 m4/sum.m4 \
255     m4/dotprod.m4 m4/dotprodl.m4 m4/dotprodc.m4 m4/matmul.m4 m4/matmull.m4 \
256     m4/ctrig.m4 m4/cexp.m4 m4/chyp.m4 m4/mtype.m4 \
257     m4/specific.m4 m4/specific2.m4 m4/head.m4 m4/shape.m4 m4/reshape.m4 \
258     m4/transpose.m4 m4/eoshift1.m4 m4/eoshift3.m4 m4/exponent.m4 \
259     m4/fraction.m4 m4/nearest.m4 m4/set_exponent.m4 m4/pow.m4
260
261 gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \
262     $(i_maxloc1_c) $(i_maxval_c) $(i_minloc0_c) $(i_minloc1_c) $(i_minval_c) \
263     $(i_product_c) $(i_sum_c) $(i_dotprod_c) $(i_dotprodl_c) $(i_dotprodc_c) \
264     $(i_matmul_c) $(i_matmull_c) $(i_transpose_c) $(i_shape_c) $(i_eoshift1_c) \
265     $(i_eoshift3_c) $(i_cshift1_c) $(i_reshape_c) $(in_pack_c) $(in_unpack_c) \
266     $(i_exponent_c) $(i_fraction_c) $(i_nearest_c) $(i_set_exponent_c) \
267     $(i_pow_c)
268
269 # We only use these if libm doesn't contain complex math functions.
270
271 gfor_math_trig_c= \
272 generated/trig_c4.c \
273 generated/trig_c8.c
274 gfor_math_exp_c= \
275 generated/exp_c4.c \
276 generated/exp_c8.c
277 gfor_math_hyp_c= \
278 generated/hyp_c4.c \
279 generated/hyp_c8.c
280
281 gfor_math_trig_obj= \
282 trig_c4.lo \
283 trig_c8.lo
284 gfor_math_exp_obj= \
285 exp_c4.lo \
286 exp_c8.lo
287 gfor_math_hyp_obj= \
288 hyp_c4.lo \
289 hyp_c8.lo
290
291 # Machine generated specifics
292 gfor_built_specific_src= \
293 generated/_abs_c4.f90 \
294 generated/_abs_c8.f90 \
295 generated/_abs_i4.f90 \
296 generated/_abs_i8.f90 \
297 generated/_abs_r4.f90 \
298 generated/_abs_r8.f90 \
299 generated/_exp_r4.f90 \
300 generated/_exp_r8.f90 \
301 generated/_exp_c4.f90 \
302 generated/_exp_c8.f90 \
303 generated/_log_r4.f90 \
304 generated/_log_r8.f90 \
305 generated/_log_c4.f90 \
306 generated/_log_c8.f90 \
307 generated/_log10_r4.f90 \
308 generated/_log10_r8.f90 \
309 generated/_sqrt_r4.f90 \
310 generated/_sqrt_r8.f90 \
311 generated/_sqrt_c4.f90 \
312 generated/_sqrt_c8.f90 \
313 generated/_asin_r4.f90 \
314 generated/_asin_r8.f90 \
315 generated/_acos_r4.f90 \
316 generated/_acos_r8.f90 \
317 generated/_atan_r4.f90 \
318 generated/_atan_r8.f90 \
319 generated/_sin_r4.f90 \
320 generated/_sin_r8.f90 \
321 generated/_sin_c4.f90 \
322 generated/_sin_c8.f90 \
323 generated/_cos_r4.f90 \
324 generated/_cos_r8.f90 \
325 generated/_cos_c4.f90 \
326 generated/_cos_c8.f90 \
327 generated/_tan_r4.f90 \
328 generated/_tan_r8.f90 \
329 generated/_sinh_r4.f90 \
330 generated/_sinh_r8.f90 \
331 generated/_cosh_r4.f90 \
332 generated/_cosh_r8.f90 \
333 generated/_tanh_r4.f90 \
334 generated/_tanh_r8.f90 \
335 generated/_conjg_c4.f90 \
336 generated/_conjg_c8.f90 \
337 generated/_aint_r4.f90 \
338 generated/_aint_r8.f90 \
339 generated/_anint_r4.f90 \
340 generated/_anint_r8.f90
341
342 gfor_built_specific2_src= \
343 generated/_sign_i4.f90 \
344 generated/_sign_i8.f90 \
345 generated/_sign_r4.f90 \
346 generated/_sign_r8.f90 \
347 generated/_dim_i4.f90 \
348 generated/_dim_i8.f90 \
349 generated/_dim_r4.f90 \
350 generated/_dim_r8.f90 \
351 generated/_atan2_r4.f90 \
352 generated/_atan2_r8.f90 \
353 generated/_mod_i4.f90 \
354 generated/_mod_i8.f90 \
355 generated/_mod_r4.f90 \
356 generated/_mod_r8.f90
357 #specific intrinsics requiring manal code
358 #gfor_specific_c= \
359 intrinsics/_aimag.c \
360 intrinsics/_cabs.c \
361 foo
362
363 gfor_specific_src= \
364 $(gfor_built_specific_src) \
365 $(gfor_built_specific2_src) \
366 intrinsics/dprod_r8.f90
367
368 gfor_cmath_src= $(gfor_math_trig_c) $(gfor_math_exp_c) $(gfor_math_hyp_c)
369 gfor_cmath_obj= $(gfor_math_trig_obj) $(gfor_math_exp_obj) \
370     $(gfor_math_hyp_obj)
371
372 BUILT_SOURCES=$(gfor_built_src) $(gfor_cmath_src) $(gfor_built_specific_src) \
373     $(gfor_built_specific2_src)
374 libgfortran_la_SOURCES = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \
375     $(gfor_helper_src) $(gfor_io_headers) $(gfor_specific_src)
376
377 EXTRA_libgfortran_la_SOURCES = $(gfor_cmath_src)
378
379 libgfortran_la_LIBADD = @MATH_OBJ@
380 libgfortran_la_DEPENDENCIES = @MATH_OBJ@
381
382 I_M4_DEPS=m4/iparm.m4
383 I_M4_DEPS0=$(I_M4_DEPS) m4/iforeach.m4
384 I_M4_DEPS1=$(I_M4_DEPS) m4/ifunction.m4
385
386 ## A 'normal' build shouldn't need to regenerate these
387 ## so we only include them in maintainer mode
388
389 if MAINTAINER_MODE
390 $(i_all_c): m4/all.m4 $(I_M4_DEPS1)
391         m4 -Dfile=$@ -I$(srcdir)/m4 all.m4 > $@
392
393 $(i_any_c): m4/any.m4 $(I_M4_DEPS1)
394         m4 -Dfile=$@ -I$(srcdir)/m4 any.m4> $@
395
396 $(i_count_c): m4/count.m4 $(I_M4_DEPS1)
397         m4 -Dfile=$@ -I$(srcdir)/m4 count.m4> $@
398
399 $(i_maxloc0_c): m4/maxloc0.m4 $(I_M4_DEPS0)
400         m4 -Dfile=$@ -I$(srcdir)/m4 maxloc0.m4 > $@
401
402 $(i_maxloc1_c): m4/maxloc1.m4 $(I_M4_DEPS1)
403         m4 -Dfile=$@ -I$(srcdir)/m4 maxloc1.m4 > $@
404
405 $(i_maxval_c): m4/maxval.m4 $(I_M4_DEPS1)
406         m4 -Dfile=$@ -I$(srcdir)/m4 maxval.m4 > $@
407
408 $(i_minloc0_c): m4/minloc0.m4 $(I_M4_DEPS0)
409         m4 -Dfile=$@ -I$(srcdir)/m4 minloc0.m4 > $@
410
411 $(i_minloc1_c): m4/minloc1.m4 $(I_M4_DEPS1)
412         m4 -Dfile=$@ -I$(srcdir)/m4 minloc1.m4 > $@
413
414 $(i_minval_c): m4/minval.m4 $(I_M4_DEPS1)
415         m4 -Dfile=$@ -I$(srcdir)/m4 minval.m4 > $@
416
417 $(i_product_c): m4/product.m4 $(I_M4_DEPS1)
418         m4 -Dfile=$@ -I$(srcdir)/m4 product.m4 > $@
419
420 $(i_sum_c): m4/sum.m4 $(I_M4_DEPS1)
421         m4 -Dfile=$@ -I$(srcdir)/m4 sum.m4 > $@
422
423 $(i_dotprod_c): m4/dotprod.m4 $(I_M4_DEPS)
424         m4 -Dfile=$@ -I$(srcdir)/m4 dotprod.m4 > $@
425
426 $(i_dotprodl_c): m4/dotprodl.m4 $(I_M4_DEPS)
427         m4 -Dfile=$@ -I$(srcdir)/m4 dotprodl.m4 > $@
428
429 $(i_dotprodc_c): m4/dotprodc.m4 $(I_M4_DEPS)
430         m4 -Dfile=$@ -I$(srcdir)/m4 dotprodc.m4 > $@
431
432 $(i_matmul_c): m4/matmul.m4 $(I_M4_DEPS)
433         m4 -Dfile=$@ -I$(srcdir)/m4 matmul.m4 > $@
434
435 $(i_matmull_c): m4/matmull.m4 $(I_M4_DEPS)
436         m4 -Dfile=$@ -I$(srcdir)/m4 matmull.m4 > $@
437
438 $(i_transpose_c): m4/transpose.m4 $(I_M4_DEPS)
439         m4 -Dfile=$@ -I$(srcdir)/m4 transpose.m4 > $@
440
441 $(i_shape_c): m4/shape.m4 $(I_M4_DEPS)
442         m4 -Dfile=$@ -I$(srcdir)/m4 shape.m4 > $@
443
444 $(i_reshape_c): m4/reshape.m4 $(I_M4_DEPS)
445         m4 -Dfile=$@ -I$(srcdir)/m4 reshape.m4 > $@
446
447 $(i_eoshift1_c): m4/eoshift1.m4 $(I_M4_DEPS)
448         m4 -Dfile=$@ -I$(srcdir)/m4 eoshift1.m4 > $@
449
450 $(i_eoshift3_c): m4/eoshift3.m4 $(I_M4_DEPS)
451         m4 -Dfile=$@ -I$(srcdir)/m4 eoshift3.m4 > $@
452
453 $(i_cshift1_c): m4/cshift1.m4 $(I_M4_DEPS)
454         m4 -Dfile=$@ -I$(srcdir)/m4 cshift1.m4 > $@
455
456 $(in_pack_c): m4/in_pack.m4 $(I_M4_DEPS)
457         m4 -Dfile=$@ -I$(srcdir)/m4 in_pack.m4 > $@
458
459 $(in_unpack_c): m4/in_unpack.m4 $(I_M4_DEPS)
460         m4 -Dfile=$@ -I$(srcdir)/m4 in_unpack.m4 > $@
461
462 $(i_exponent_c): m4/exponent.m4 m4/mtype.m4
463         m4 -Dfile=$@ -I$(srcdir)/m4 exponent.m4 > $@
464
465 $(i_fraction_c): m4/fraction.m4 m4/mtype.m4
466         m4 -Dfile=$@ -I$(srcdir)/m4 fraction.m4 > $@
467
468 $(i_nearest_c): m4/nearest.m4 m4/mtype.m4
469         m4 -Dfile=$@ -I$(srcdir)/m4 nearest.m4 > $@
470
471 $(i_set_exponent_c): m4/set_exponent.m4 m4/mtype.m4
472         m4 -Dfile=$@ -I$(srcdir)/m4 set_exponent.m4 > $@
473
474 $(i_pow_c): m4/pow.m4 $(I_M4_DEPS)
475         m4 -Dfile=$@ -I$(srcdir)/m4 pow.m4 > $@
476
477 $(gfor_math_trig_c): m4/ctrig.m4 m4/mtype.m4
478         m4 -Dfile=$@ -I$(srcdir)/m4 ctrig.m4 > $@
479
480 $(gfor_math_exp_c): m4/cexp.m4 m4/mtype.m4
481         m4 -Dfile=$@ -I$(srcdir)/m4 cexp.m4 > $@
482
483 $(gfor_math_hyp_c): m4/chyp.m4 m4/mtype.m4
484         m4 -Dfile=$@ -I$(srcdir)/m4 chyp.m4 > $@
485
486 $(gfor_built_specific_src): m4/specific.m4 m4/head.m4
487         m4 -Dfile=$@ -I$(srcdir)/m4 specific.m4 > $@
488
489 $(gfor_built_specific2_src): m4/specific2.m4 m4/head.m4
490         m4 -Dfile=$@ -I$(srcdir)/m4 specific2.m4 > $@
491 ## end of maintainer mode only rules
492 endif
493
494 EXTRA_DIST = $(m4_files)
495