OSDN Git Service

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