OSDN Git Service

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