OSDN Git Service

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