OSDN Git Service

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