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