OSDN Git Service

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