OSDN Git Service

2008-02-25 Janne Blomqvist <jb@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / libgfortran / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3
4 ACLOCAL_AMFLAGS = -I .. -I ../config
5
6 ## May be used by toolexeclibdir.
7 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
8
9 ## Symbol versioning (copied from libssp).
10 if LIBGFOR_USE_SYMVER
11 version_arg = -Wl,--version-script=$(srcdir)/gfortran.map
12 else
13 version_arg =
14 endif
15
16 toolexeclib_LTLIBRARIES = libgfortran.la
17 libgfortran_la_LINK = $(LINK)
18 libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran) $(version_arg)
19
20 myexeclib_LTLIBRARIES = libgfortranbegin.la
21 myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
22 libgfortranbegin_la_SOURCES = fmain.c
23 libgfortranbegin_la_LDFLAGS = -static
24
25 ## io.h conflicts with a system header on some platforms, so
26 ## use -iquote
27 AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \
28               -I$(srcdir)/$(MULTISRCTOP)../gcc/config \
29               -I$(MULTIBUILDTOP)../../$(host_subdir)/gcc -D_GNU_SOURCE
30
31 # Fortran rules for complex multiplication and division
32 AM_CFLAGS += -fcx-fortran-rules
33
34 gfor_io_src= \
35 io/close.c \
36 io/file_pos.c \
37 io/format.c \
38 io/inquire.c \
39 io/intrinsics.c \
40 io/list_read.c \
41 io/lock.c \
42 io/open.c \
43 io/read.c \
44 io/size_from_kind.c \
45 io/transfer.c \
46 io/unit.c \
47 io/unix.c \
48 io/write.c
49
50 gfor_io_headers= \
51 io/io.h
52
53 gfor_helper_src= \
54 intrinsics/associated.c \
55 intrinsics/abort.c \
56 intrinsics/access.c \
57 intrinsics/args.c \
58 intrinsics/c99_functions.c \
59 intrinsics/chdir.c \
60 intrinsics/chmod.c \
61 intrinsics/clock.c \
62 intrinsics/cpu_time.c \
63 intrinsics/cshift0.c \
64 intrinsics/ctime.c \
65 intrinsics/date_and_time.c \
66 intrinsics/dtime.c \
67 intrinsics/env.c \
68 intrinsics/eoshift0.c \
69 intrinsics/eoshift2.c \
70 intrinsics/etime.c \
71 intrinsics/exit.c \
72 intrinsics/fnum.c \
73 intrinsics/gerror.c \
74 intrinsics/getcwd.c \
75 intrinsics/getlog.c \
76 intrinsics/getXid.c \
77 intrinsics/hostnm.c \
78 intrinsics/ierrno.c \
79 intrinsics/ishftc.c \
80 intrinsics/iso_c_generated_procs.c \
81 intrinsics/iso_c_binding.c \
82 intrinsics/kill.c \
83 intrinsics/link.c \
84 intrinsics/malloc.c \
85 intrinsics/mvbits.c \
86 intrinsics/move_alloc.c \
87 intrinsics/pack_generic.c \
88 intrinsics/perror.c \
89 intrinsics/signal.c \
90 intrinsics/size.c \
91 intrinsics/sleep.c \
92 intrinsics/spread_generic.c \
93 intrinsics/string_intrinsics.c \
94 intrinsics/system.c \
95 intrinsics/rand.c \
96 intrinsics/random.c \
97 intrinsics/rename.c \
98 intrinsics/reshape_generic.c \
99 intrinsics/reshape_packed.c \
100 intrinsics/selected_int_kind.f90 \
101 intrinsics/selected_real_kind.f90 \
102 intrinsics/stat.c \
103 intrinsics/symlnk.c \
104 intrinsics/system_clock.c \
105 intrinsics/time.c \
106 intrinsics/transpose_generic.c \
107 intrinsics/umask.c \
108 intrinsics/unlink.c \
109 intrinsics/unpack_generic.c \
110 runtime/in_pack_generic.c \
111 runtime/in_unpack_generic.c
112
113 gfor_src= \
114 runtime/backtrace.c \
115 runtime/compile_options.c \
116 runtime/environ.c \
117 runtime/error.c \
118 runtime/fpu.c \
119 runtime/main.c \
120 runtime/memory.c \
121 runtime/pause.c \
122 runtime/stop.c \
123 runtime/string.c \
124 runtime/select.c
125
126 i_all_c= \
127 $(srcdir)/generated/all_l1.c \
128 $(srcdir)/generated/all_l2.c \
129 $(srcdir)/generated/all_l4.c \
130 $(srcdir)/generated/all_l8.c \
131 $(srcdir)/generated/all_l16.c
132
133 i_any_c= \
134 $(srcdir)/generated/any_l1.c \
135 $(srcdir)/generated/any_l2.c \
136 $(srcdir)/generated/any_l4.c \
137 $(srcdir)/generated/any_l8.c \
138 $(srcdir)/generated/any_l16.c
139
140 i_count_c= \
141 $(srcdir)/generated/count_1_l.c \
142 $(srcdir)/generated/count_2_l.c \
143 $(srcdir)/generated/count_4_l.c \
144 $(srcdir)/generated/count_8_l.c \
145 $(srcdir)/generated/count_16_l.c
146
147 i_maxloc0_c= \
148 $(srcdir)/generated/maxloc0_4_i1.c \
149 $(srcdir)/generated/maxloc0_8_i1.c \
150 $(srcdir)/generated/maxloc0_16_i1.c \
151 $(srcdir)/generated/maxloc0_4_i2.c \
152 $(srcdir)/generated/maxloc0_8_i2.c \
153 $(srcdir)/generated/maxloc0_16_i2.c \
154 $(srcdir)/generated/maxloc0_4_i4.c \
155 $(srcdir)/generated/maxloc0_8_i4.c \
156 $(srcdir)/generated/maxloc0_16_i4.c \
157 $(srcdir)/generated/maxloc0_4_i8.c \
158 $(srcdir)/generated/maxloc0_8_i8.c \
159 $(srcdir)/generated/maxloc0_16_i8.c \
160 $(srcdir)/generated/maxloc0_4_i16.c \
161 $(srcdir)/generated/maxloc0_8_i16.c \
162 $(srcdir)/generated/maxloc0_16_i16.c \
163 $(srcdir)/generated/maxloc0_4_r4.c \
164 $(srcdir)/generated/maxloc0_8_r4.c \
165 $(srcdir)/generated/maxloc0_16_r4.c \
166 $(srcdir)/generated/maxloc0_4_r8.c \
167 $(srcdir)/generated/maxloc0_8_r8.c \
168 $(srcdir)/generated/maxloc0_16_r8.c \
169 $(srcdir)/generated/maxloc0_4_r10.c \
170 $(srcdir)/generated/maxloc0_8_r10.c \
171 $(srcdir)/generated/maxloc0_16_r10.c \
172 $(srcdir)/generated/maxloc0_4_r16.c \
173 $(srcdir)/generated/maxloc0_8_r16.c \
174 $(srcdir)/generated/maxloc0_16_r16.c
175
176 i_maxloc1_c= \
177 $(srcdir)/generated/maxloc1_4_i1.c \
178 $(srcdir)/generated/maxloc1_8_i1.c \
179 $(srcdir)/generated/maxloc1_16_i1.c \
180 $(srcdir)/generated/maxloc1_4_i2.c \
181 $(srcdir)/generated/maxloc1_8_i2.c \
182 $(srcdir)/generated/maxloc1_16_i2.c \
183 $(srcdir)/generated/maxloc1_4_i4.c \
184 $(srcdir)/generated/maxloc1_8_i4.c \
185 $(srcdir)/generated/maxloc1_16_i4.c \
186 $(srcdir)/generated/maxloc1_4_i8.c \
187 $(srcdir)/generated/maxloc1_8_i8.c \
188 $(srcdir)/generated/maxloc1_16_i8.c \
189 $(srcdir)/generated/maxloc1_4_i16.c \
190 $(srcdir)/generated/maxloc1_8_i16.c \
191 $(srcdir)/generated/maxloc1_16_i16.c \
192 $(srcdir)/generated/maxloc1_4_r4.c \
193 $(srcdir)/generated/maxloc1_8_r4.c \
194 $(srcdir)/generated/maxloc1_16_r4.c \
195 $(srcdir)/generated/maxloc1_4_r8.c \
196 $(srcdir)/generated/maxloc1_8_r8.c \
197 $(srcdir)/generated/maxloc1_16_r8.c \
198 $(srcdir)/generated/maxloc1_4_r10.c \
199 $(srcdir)/generated/maxloc1_8_r10.c \
200 $(srcdir)/generated/maxloc1_16_r10.c \
201 $(srcdir)/generated/maxloc1_4_r16.c \
202 $(srcdir)/generated/maxloc1_8_r16.c \
203 $(srcdir)/generated/maxloc1_16_r16.c
204
205 i_maxval_c= \
206 $(srcdir)/generated/maxval_i1.c \
207 $(srcdir)/generated/maxval_i2.c \
208 $(srcdir)/generated/maxval_i4.c \
209 $(srcdir)/generated/maxval_i8.c \
210 $(srcdir)/generated/maxval_i16.c \
211 $(srcdir)/generated/maxval_r4.c \
212 $(srcdir)/generated/maxval_r8.c \
213 $(srcdir)/generated/maxval_r10.c \
214 $(srcdir)/generated/maxval_r16.c
215
216 i_minloc0_c= \
217 $(srcdir)/generated/minloc0_4_i1.c \
218 $(srcdir)/generated/minloc0_8_i1.c \
219 $(srcdir)/generated/minloc0_16_i1.c \
220 $(srcdir)/generated/minloc0_4_i2.c \
221 $(srcdir)/generated/minloc0_8_i2.c \
222 $(srcdir)/generated/minloc0_16_i2.c \
223 $(srcdir)/generated/minloc0_4_i4.c \
224 $(srcdir)/generated/minloc0_8_i4.c \
225 $(srcdir)/generated/minloc0_16_i4.c \
226 $(srcdir)/generated/minloc0_4_i8.c \
227 $(srcdir)/generated/minloc0_8_i8.c \
228 $(srcdir)/generated/minloc0_16_i8.c \
229 $(srcdir)/generated/minloc0_4_i16.c \
230 $(srcdir)/generated/minloc0_8_i16.c \
231 $(srcdir)/generated/minloc0_16_i16.c \
232 $(srcdir)/generated/minloc0_4_r4.c \
233 $(srcdir)/generated/minloc0_8_r4.c \
234 $(srcdir)/generated/minloc0_16_r4.c \
235 $(srcdir)/generated/minloc0_4_r8.c \
236 $(srcdir)/generated/minloc0_8_r8.c \
237 $(srcdir)/generated/minloc0_16_r8.c \
238 $(srcdir)/generated/minloc0_4_r10.c \
239 $(srcdir)/generated/minloc0_8_r10.c \
240 $(srcdir)/generated/minloc0_16_r10.c \
241 $(srcdir)/generated/minloc0_4_r16.c \
242 $(srcdir)/generated/minloc0_8_r16.c \
243 $(srcdir)/generated/minloc0_16_r16.c
244
245 i_minloc1_c= \
246 $(srcdir)/generated/minloc1_4_i1.c \
247 $(srcdir)/generated/minloc1_8_i1.c \
248 $(srcdir)/generated/minloc1_16_i1.c \
249 $(srcdir)/generated/minloc1_4_i2.c \
250 $(srcdir)/generated/minloc1_8_i2.c \
251 $(srcdir)/generated/minloc1_16_i2.c \
252 $(srcdir)/generated/minloc1_4_i4.c \
253 $(srcdir)/generated/minloc1_8_i4.c \
254 $(srcdir)/generated/minloc1_16_i4.c \
255 $(srcdir)/generated/minloc1_4_i8.c \
256 $(srcdir)/generated/minloc1_8_i8.c \
257 $(srcdir)/generated/minloc1_16_i8.c \
258 $(srcdir)/generated/minloc1_4_i16.c \
259 $(srcdir)/generated/minloc1_8_i16.c \
260 $(srcdir)/generated/minloc1_16_i16.c \
261 $(srcdir)/generated/minloc1_4_r4.c \
262 $(srcdir)/generated/minloc1_8_r4.c \
263 $(srcdir)/generated/minloc1_16_r4.c \
264 $(srcdir)/generated/minloc1_4_r8.c \
265 $(srcdir)/generated/minloc1_8_r8.c \
266 $(srcdir)/generated/minloc1_16_r8.c \
267 $(srcdir)/generated/minloc1_4_r10.c \
268 $(srcdir)/generated/minloc1_8_r10.c \
269 $(srcdir)/generated/minloc1_16_r10.c \
270 $(srcdir)/generated/minloc1_4_r16.c \
271 $(srcdir)/generated/minloc1_8_r16.c \
272 $(srcdir)/generated/minloc1_16_r16.c
273
274 i_minval_c= \
275 $(srcdir)/generated/minval_i1.c \
276 $(srcdir)/generated/minval_i2.c \
277 $(srcdir)/generated/minval_i4.c \
278 $(srcdir)/generated/minval_i8.c \
279 $(srcdir)/generated/minval_i16.c \
280 $(srcdir)/generated/minval_r4.c \
281 $(srcdir)/generated/minval_r8.c \
282 $(srcdir)/generated/minval_r10.c \
283 $(srcdir)/generated/minval_r16.c
284
285 i_sum_c= \
286 $(srcdir)/generated/sum_i1.c \
287 $(srcdir)/generated/sum_i2.c \
288 $(srcdir)/generated/sum_i4.c \
289 $(srcdir)/generated/sum_i8.c \
290 $(srcdir)/generated/sum_i16.c \
291 $(srcdir)/generated/sum_r4.c \
292 $(srcdir)/generated/sum_r8.c \
293 $(srcdir)/generated/sum_r10.c \
294 $(srcdir)/generated/sum_r16.c \
295 $(srcdir)/generated/sum_c4.c \
296 $(srcdir)/generated/sum_c8.c \
297 $(srcdir)/generated/sum_c10.c \
298 $(srcdir)/generated/sum_c16.c
299
300 i_product_c= \
301 $(srcdir)/generated/product_i1.c \
302 $(srcdir)/generated/product_i2.c \
303 $(srcdir)/generated/product_i4.c \
304 $(srcdir)/generated/product_i8.c \
305 $(srcdir)/generated/product_i16.c \
306 $(srcdir)/generated/product_r4.c \
307 $(srcdir)/generated/product_r8.c \
308 $(srcdir)/generated/product_r10.c \
309 $(srcdir)/generated/product_r16.c \
310 $(srcdir)/generated/product_c4.c \
311 $(srcdir)/generated/product_c8.c \
312 $(srcdir)/generated/product_c10.c \
313 $(srcdir)/generated/product_c16.c
314
315 i_matmul_c= \
316 $(srcdir)/generated/matmul_i1.c \
317 $(srcdir)/generated/matmul_i2.c \
318 $(srcdir)/generated/matmul_i4.c \
319 $(srcdir)/generated/matmul_i8.c \
320 $(srcdir)/generated/matmul_i16.c \
321 $(srcdir)/generated/matmul_r4.c \
322 $(srcdir)/generated/matmul_r8.c \
323 $(srcdir)/generated/matmul_r10.c \
324 $(srcdir)/generated/matmul_r16.c \
325 $(srcdir)/generated/matmul_c4.c \
326 $(srcdir)/generated/matmul_c8.c \
327 $(srcdir)/generated/matmul_c10.c \
328 $(srcdir)/generated/matmul_c16.c
329
330 i_matmull_c= \
331 $(srcdir)/generated/matmul_l4.c \
332 $(srcdir)/generated/matmul_l8.c \
333 $(srcdir)/generated/matmul_l16.c
334
335 i_transpose_c= \
336 $(srcdir)/generated/transpose_i4.c \
337 $(srcdir)/generated/transpose_i8.c \
338 $(srcdir)/generated/transpose_i16.c \
339 $(srcdir)/generated/transpose_r4.c \
340 $(srcdir)/generated/transpose_r8.c \
341 $(srcdir)/generated/transpose_r10.c \
342 $(srcdir)/generated/transpose_r16.c \
343 $(srcdir)/generated/transpose_c4.c \
344 $(srcdir)/generated/transpose_c8.c \
345 $(srcdir)/generated/transpose_c10.c \
346 $(srcdir)/generated/transpose_c16.c
347
348 i_shape_c= \
349 $(srcdir)/generated/shape_i4.c \
350 $(srcdir)/generated/shape_i8.c \
351 $(srcdir)/generated/shape_i16.c
352
353 i_reshape_c= \
354 $(srcdir)/generated/reshape_i4.c \
355 $(srcdir)/generated/reshape_i8.c \
356 $(srcdir)/generated/reshape_i16.c \
357 $(srcdir)/generated/reshape_r4.c \
358 $(srcdir)/generated/reshape_r8.c \
359 $(srcdir)/generated/reshape_r10.c \
360 $(srcdir)/generated/reshape_r16.c \
361 $(srcdir)/generated/reshape_c4.c \
362 $(srcdir)/generated/reshape_c8.c \
363 $(srcdir)/generated/reshape_c10.c \
364 $(srcdir)/generated/reshape_c16.c
365
366 i_eoshift1_c= \
367 $(srcdir)/generated/eoshift1_4.c \
368 $(srcdir)/generated/eoshift1_8.c \
369 $(srcdir)/generated/eoshift1_16.c
370
371 i_eoshift3_c= \
372 $(srcdir)/generated/eoshift3_4.c \
373 $(srcdir)/generated/eoshift3_8.c \
374 $(srcdir)/generated/eoshift3_16.c
375
376 i_cshift1_c= \
377 $(srcdir)/generated/cshift1_4.c \
378 $(srcdir)/generated/cshift1_8.c \
379 $(srcdir)/generated/cshift1_16.c
380
381 in_pack_c = \
382 $(srcdir)/generated/in_pack_i4.c \
383 $(srcdir)/generated/in_pack_i8.c \
384 $(srcdir)/generated/in_pack_i16.c \
385 $(srcdir)/generated/in_pack_c4.c \
386 $(srcdir)/generated/in_pack_c8.c \
387 $(srcdir)/generated/in_pack_c10.c \
388 $(srcdir)/generated/in_pack_c16.c
389
390 in_unpack_c = \
391 $(srcdir)/generated/in_unpack_i4.c \
392 $(srcdir)/generated/in_unpack_i8.c \
393 $(srcdir)/generated/in_unpack_i16.c \
394 $(srcdir)/generated/in_unpack_c4.c \
395 $(srcdir)/generated/in_unpack_c8.c \
396 $(srcdir)/generated/in_unpack_c10.c \
397 $(srcdir)/generated/in_unpack_c16.c
398
399 i_exponent_c = \
400 $(srcdir)/generated/exponent_r4.c \
401 $(srcdir)/generated/exponent_r8.c \
402 $(srcdir)/generated/exponent_r10.c \
403 $(srcdir)/generated/exponent_r16.c
404
405 i_spacing_c = \
406 $(srcdir)/generated/spacing_r4.c \
407 $(srcdir)/generated/spacing_r8.c \
408 $(srcdir)/generated/spacing_r10.c \
409 $(srcdir)/generated/spacing_r16.c
410
411 i_rrspacing_c = \
412 $(srcdir)/generated/rrspacing_r4.c \
413 $(srcdir)/generated/rrspacing_r8.c \
414 $(srcdir)/generated/rrspacing_r10.c \
415 $(srcdir)/generated/rrspacing_r16.c
416
417 i_fraction_c = \
418 $(srcdir)/generated/fraction_r4.c \
419 $(srcdir)/generated/fraction_r8.c \
420 $(srcdir)/generated/fraction_r10.c \
421 $(srcdir)/generated/fraction_r16.c
422
423 i_nearest_c = \
424 $(srcdir)/generated/nearest_r4.c \
425 $(srcdir)/generated/nearest_r8.c \
426 $(srcdir)/generated/nearest_r10.c \
427 $(srcdir)/generated/nearest_r16.c
428
429 i_set_exponent_c = \
430 $(srcdir)/generated/set_exponent_r4.c \
431 $(srcdir)/generated/set_exponent_r8.c \
432 $(srcdir)/generated/set_exponent_r10.c \
433 $(srcdir)/generated/set_exponent_r16.c
434
435 i_pow_c = \
436 $(srcdir)/generated/pow_i4_i4.c \
437 $(srcdir)/generated/pow_i8_i4.c \
438 $(srcdir)/generated/pow_i16_i4.c \
439 $(srcdir)/generated/pow_c4_i4.c \
440 $(srcdir)/generated/pow_c8_i4.c \
441 $(srcdir)/generated/pow_c10_i4.c \
442 $(srcdir)/generated/pow_c16_i4.c \
443 $(srcdir)/generated/pow_i4_i8.c \
444 $(srcdir)/generated/pow_i8_i8.c \
445 $(srcdir)/generated/pow_i16_i8.c \
446 $(srcdir)/generated/pow_r4_i8.c \
447 $(srcdir)/generated/pow_r8_i8.c \
448 $(srcdir)/generated/pow_r10_i8.c \
449 $(srcdir)/generated/pow_r16_i8.c \
450 $(srcdir)/generated/pow_c4_i8.c \
451 $(srcdir)/generated/pow_c8_i8.c \
452 $(srcdir)/generated/pow_c10_i8.c \
453 $(srcdir)/generated/pow_c16_i8.c \
454 $(srcdir)/generated/pow_i4_i16.c \
455 $(srcdir)/generated/pow_i8_i16.c \
456 $(srcdir)/generated/pow_i16_i16.c \
457 $(srcdir)/generated/pow_r4_i16.c \
458 $(srcdir)/generated/pow_r8_i16.c \
459 $(srcdir)/generated/pow_r10_i16.c \
460 $(srcdir)/generated/pow_r16_i16.c \
461 $(srcdir)/generated/pow_c4_i16.c \
462 $(srcdir)/generated/pow_c8_i16.c \
463 $(srcdir)/generated/pow_c10_i16.c \
464 $(srcdir)/generated/pow_c16_i16.c
465
466 m4_files= m4/iparm.m4 m4/ifunction.m4 m4/iforeach.m4 m4/all.m4 \
467     m4/any.m4 m4/count.m4 m4/maxloc0.m4 m4/maxloc1.m4 m4/maxval.m4 \
468     m4/minloc0.m4 m4/minloc1.m4 m4/minval.m4 m4/product.m4 m4/sum.m4 \
469     m4/matmul.m4 m4/matmull.m4 m4/ifunction_logical.m4 \
470     m4/ctrig.m4 m4/cexp.m4 m4/chyp.m4 m4/mtype.m4 \
471     m4/specific.m4 m4/specific2.m4 m4/head.m4 m4/shape.m4 m4/reshape.m4 \
472     m4/transpose.m4 m4/eoshift1.m4 m4/eoshift3.m4 m4/exponent.m4 \
473     m4/fraction.m4 m4/nearest.m4 m4/set_exponent.m4 m4/pow.m4 \
474     m4/misc_specifics.m4 m4/rrspacing.m4 m4/spacing.m4
475
476 gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \
477     $(i_maxloc1_c) $(i_maxval_c) $(i_minloc0_c) $(i_minloc1_c) $(i_minval_c) \
478     $(i_product_c) $(i_sum_c) \
479     $(i_matmul_c) $(i_matmull_c) $(i_transpose_c) $(i_shape_c) $(i_eoshift1_c) \
480     $(i_eoshift3_c) $(i_cshift1_c) $(i_reshape_c) $(in_pack_c) $(in_unpack_c) \
481     $(i_exponent_c) $(i_fraction_c) $(i_nearest_c) $(i_set_exponent_c) \
482     $(i_pow_c) $(i_rrspacing_c) $(i_spacing_c) \
483     selected_int_kind.inc selected_real_kind.inc kinds.h \
484     kinds.inc c99_protos.inc fpu-target.h
485
486 # Machine generated specifics
487 gfor_built_specific_src= \
488 $(srcdir)/generated/_abs_c4.F90 \
489 $(srcdir)/generated/_abs_c8.F90 \
490 $(srcdir)/generated/_abs_c10.F90 \
491 $(srcdir)/generated/_abs_c16.F90 \
492 $(srcdir)/generated/_abs_i4.F90 \
493 $(srcdir)/generated/_abs_i8.F90 \
494 $(srcdir)/generated/_abs_i16.F90 \
495 $(srcdir)/generated/_abs_r4.F90 \
496 $(srcdir)/generated/_abs_r8.F90 \
497 $(srcdir)/generated/_abs_r10.F90 \
498 $(srcdir)/generated/_abs_r16.F90 \
499 $(srcdir)/generated/_aimag_c4.F90 \
500 $(srcdir)/generated/_aimag_c8.F90 \
501 $(srcdir)/generated/_aimag_c10.F90 \
502 $(srcdir)/generated/_aimag_c16.F90 \
503 $(srcdir)/generated/_exp_r4.F90 \
504 $(srcdir)/generated/_exp_r8.F90 \
505 $(srcdir)/generated/_exp_r10.F90 \
506 $(srcdir)/generated/_exp_r16.F90 \
507 $(srcdir)/generated/_exp_c4.F90 \
508 $(srcdir)/generated/_exp_c8.F90 \
509 $(srcdir)/generated/_exp_c10.F90 \
510 $(srcdir)/generated/_exp_c16.F90 \
511 $(srcdir)/generated/_log_r4.F90 \
512 $(srcdir)/generated/_log_r8.F90 \
513 $(srcdir)/generated/_log_r10.F90 \
514 $(srcdir)/generated/_log_r16.F90 \
515 $(srcdir)/generated/_log_c4.F90 \
516 $(srcdir)/generated/_log_c8.F90 \
517 $(srcdir)/generated/_log_c10.F90 \
518 $(srcdir)/generated/_log_c16.F90 \
519 $(srcdir)/generated/_log10_r4.F90 \
520 $(srcdir)/generated/_log10_r8.F90 \
521 $(srcdir)/generated/_log10_r10.F90 \
522 $(srcdir)/generated/_log10_r16.F90 \
523 $(srcdir)/generated/_sqrt_r4.F90 \
524 $(srcdir)/generated/_sqrt_r8.F90 \
525 $(srcdir)/generated/_sqrt_r10.F90 \
526 $(srcdir)/generated/_sqrt_r16.F90 \
527 $(srcdir)/generated/_sqrt_c4.F90 \
528 $(srcdir)/generated/_sqrt_c8.F90 \
529 $(srcdir)/generated/_sqrt_c10.F90 \
530 $(srcdir)/generated/_sqrt_c16.F90 \
531 $(srcdir)/generated/_asin_r4.F90 \
532 $(srcdir)/generated/_asin_r8.F90 \
533 $(srcdir)/generated/_asin_r10.F90 \
534 $(srcdir)/generated/_asin_r16.F90 \
535 $(srcdir)/generated/_asinh_r4.F90 \
536 $(srcdir)/generated/_asinh_r8.F90 \
537 $(srcdir)/generated/_asinh_r10.F90 \
538 $(srcdir)/generated/_asinh_r16.F90 \
539 $(srcdir)/generated/_acos_r4.F90 \
540 $(srcdir)/generated/_acos_r8.F90 \
541 $(srcdir)/generated/_acos_r10.F90 \
542 $(srcdir)/generated/_acos_r16.F90 \
543 $(srcdir)/generated/_acosh_r4.F90 \
544 $(srcdir)/generated/_acosh_r8.F90 \
545 $(srcdir)/generated/_acosh_r10.F90 \
546 $(srcdir)/generated/_acosh_r16.F90 \
547 $(srcdir)/generated/_atan_r4.F90 \
548 $(srcdir)/generated/_atan_r8.F90 \
549 $(srcdir)/generated/_atan_r10.F90 \
550 $(srcdir)/generated/_atan_r16.F90 \
551 $(srcdir)/generated/_atanh_r4.F90 \
552 $(srcdir)/generated/_atanh_r8.F90 \
553 $(srcdir)/generated/_atanh_r10.F90 \
554 $(srcdir)/generated/_atanh_r16.F90 \
555 $(srcdir)/generated/_sin_r4.F90 \
556 $(srcdir)/generated/_sin_r8.F90 \
557 $(srcdir)/generated/_sin_r10.F90 \
558 $(srcdir)/generated/_sin_r16.F90 \
559 $(srcdir)/generated/_sin_c4.F90 \
560 $(srcdir)/generated/_sin_c8.F90 \
561 $(srcdir)/generated/_sin_c10.F90 \
562 $(srcdir)/generated/_sin_c16.F90 \
563 $(srcdir)/generated/_cos_r4.F90 \
564 $(srcdir)/generated/_cos_r8.F90 \
565 $(srcdir)/generated/_cos_r10.F90 \
566 $(srcdir)/generated/_cos_r16.F90 \
567 $(srcdir)/generated/_cos_c4.F90 \
568 $(srcdir)/generated/_cos_c8.F90 \
569 $(srcdir)/generated/_cos_c10.F90 \
570 $(srcdir)/generated/_cos_c16.F90 \
571 $(srcdir)/generated/_tan_r4.F90 \
572 $(srcdir)/generated/_tan_r8.F90 \
573 $(srcdir)/generated/_tan_r10.F90 \
574 $(srcdir)/generated/_tan_r16.F90 \
575 $(srcdir)/generated/_sinh_r4.F90 \
576 $(srcdir)/generated/_sinh_r8.F90 \
577 $(srcdir)/generated/_sinh_r10.F90 \
578 $(srcdir)/generated/_sinh_r16.F90 \
579 $(srcdir)/generated/_cosh_r4.F90 \
580 $(srcdir)/generated/_cosh_r8.F90 \
581 $(srcdir)/generated/_cosh_r10.F90 \
582 $(srcdir)/generated/_cosh_r16.F90 \
583 $(srcdir)/generated/_tanh_r4.F90 \
584 $(srcdir)/generated/_tanh_r8.F90 \
585 $(srcdir)/generated/_tanh_r10.F90 \
586 $(srcdir)/generated/_tanh_r16.F90 \
587 $(srcdir)/generated/_conjg_c4.F90 \
588 $(srcdir)/generated/_conjg_c8.F90 \
589 $(srcdir)/generated/_conjg_c10.F90 \
590 $(srcdir)/generated/_conjg_c16.F90 \
591 $(srcdir)/generated/_aint_r4.F90 \
592 $(srcdir)/generated/_aint_r8.F90 \
593 $(srcdir)/generated/_aint_r10.F90 \
594 $(srcdir)/generated/_aint_r16.F90 \
595 $(srcdir)/generated/_anint_r4.F90 \
596 $(srcdir)/generated/_anint_r8.F90 \
597 $(srcdir)/generated/_anint_r10.F90 \
598 $(srcdir)/generated/_anint_r16.F90
599
600 gfor_built_specific2_src= \
601 $(srcdir)/generated/_sign_i4.F90 \
602 $(srcdir)/generated/_sign_i8.F90 \
603 $(srcdir)/generated/_sign_i16.F90 \
604 $(srcdir)/generated/_sign_r4.F90 \
605 $(srcdir)/generated/_sign_r8.F90 \
606 $(srcdir)/generated/_sign_r10.F90 \
607 $(srcdir)/generated/_sign_r16.F90 \
608 $(srcdir)/generated/_dim_i4.F90 \
609 $(srcdir)/generated/_dim_i8.F90 \
610 $(srcdir)/generated/_dim_i16.F90 \
611 $(srcdir)/generated/_dim_r4.F90 \
612 $(srcdir)/generated/_dim_r8.F90 \
613 $(srcdir)/generated/_dim_r10.F90 \
614 $(srcdir)/generated/_dim_r16.F90 \
615 $(srcdir)/generated/_atan2_r4.F90 \
616 $(srcdir)/generated/_atan2_r8.F90 \
617 $(srcdir)/generated/_atan2_r10.F90 \
618 $(srcdir)/generated/_atan2_r16.F90 \
619 $(srcdir)/generated/_mod_i4.F90 \
620 $(srcdir)/generated/_mod_i8.F90 \
621 $(srcdir)/generated/_mod_i16.F90 \
622 $(srcdir)/generated/_mod_r4.F90 \
623 $(srcdir)/generated/_mod_r8.F90 \
624 $(srcdir)/generated/_mod_r10.F90 \
625 $(srcdir)/generated/_mod_r16.F90
626
627 gfor_misc_specifics = $(srcdir)/generated/misc_specifics.F90
628
629 gfor_specific_src= \
630 $(gfor_built_specific_src) \
631 $(gfor_built_specific2_src) \
632 $(gfor_misc_specifics) \
633 intrinsics/dprod_r8.f90 \
634 intrinsics/f2c_specifics.F90
635
636 # No install-html or install-pdf support in automake yet
637 .PHONY: install-html install-pdf
638 install-html:
639 install-pdf:
640
641 # Turn on vectorization and loop unrolling for matmul.
642 $(patsubst %.c,%.lo,$(notdir $(i_matmul_c))): AM_CFLAGS += -ftree-vectorize -funroll-loops
643 # Logical matmul doesn't vectorize.
644 $(patsubst %.c,%.lo,$(notdir $(i_matmull_c))): AM_CFLAGS += -funroll-loops
645
646 # Add the -fallow-leading-underscore option when needed
647 $(patsubst %.F90,%.lo,$(patsubst %.f90,%.lo,$(notdir $(gfor_specific_src)))): AM_FCFLAGS += -fallow-leading-underscore
648 selected_real_kind.lo selected_int_kind.lo: AM_FCFLAGS += -fallow-leading-underscore
649
650 BUILT_SOURCES=$(gfor_built_src) $(gfor_built_specific_src) \
651     $(gfor_built_specific2_src) $(gfor_misc_specifics)
652
653 prereq_SRC = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \
654     $(gfor_helper_src) $(gfor_io_headers) $(gfor_specific_src)
655
656 if onestep
657 # dummy sources for libtool
658 BUILT_SOURCES+=libgfortran_c.c libgfortran_f.f90
659 libgfortran_c.c libgfortran_f.f90 libgfortran_F.F90:
660         echo > $@
661 # overrides for libtool perusing the dummy sources
662 libgfortran_c.o: $(filter %.c,$(prereq_SRC))
663         $(COMPILE) -c $^ -o $@ -combine
664
665 libgfortran_c.lo: $(filter %.c,$(prereq_SRC))
666         $(LTCOMPILE) -c -o $@ $^ -combine
667
668 #libgfortran_f.o: $(filter %.f %.f90,$(prereq_SRC))
669 #       $(FCCOMPILE) -c $^ -o $@ -combine
670
671 #libgfortran_f.lo: $(filter %.f %.f90,$(prereq_SRC))
672 #       $(LTFCCOMPILE) -c -o $@ $^ -combine
673 # not currently used:
674 #libgfortran_F.o: $(filter %.F %.F90,$(prereq_SRC))
675 #       $(PPFCCOMPILE) -c $^ -o $@ -combine
676 #
677 #libgfortran_F.lo: 
678 #       $(LTPPFCCOMPILE) -c -o $@ $^ -combine
679
680 libgfortran_la_SOURCES = libgfortran_c.c $(filter-out %.c,$(prereq_SRC))
681
682 else
683 libgfortran_la_SOURCES = $(prereq_SRC)
684
685 endif
686
687 I_M4_DEPS=m4/iparm.m4
688 I_M4_DEPS0=$(I_M4_DEPS) m4/iforeach.m4
689 I_M4_DEPS1=$(I_M4_DEPS) m4/ifunction.m4
690 I_M4_DEPS2=$(I_M4_DEPS) m4/ifunction_logical.m4
691
692 kinds.h: $(srcdir)/mk-kinds-h.sh
693         $(SHELL) $(srcdir)/mk-kinds-h.sh '$(FCCOMPILE)' > $@ || rm $@
694
695 kinds.inc: kinds.h
696         grep '^#' < kinds.h > $@
697
698 c99_protos.inc: $(srcdir)/c99_protos.h
699         grep '^#' < $(srcdir)/c99_protos.h > $@
700
701 selected_int_kind.inc: $(srcdir)/mk-sik-inc.sh
702         $(SHELL) $(srcdir)/mk-sik-inc.sh '$(FCCOMPILE)' > $@ || rm $@
703
704 selected_real_kind.inc: $(srcdir)/mk-srk-inc.sh
705         $(SHELL) $(srcdir)/mk-srk-inc.sh '$(FCCOMPILE)' > $@ || rm $@
706
707 fpu-target.h: $(srcdir)/$(FPU_HOST_HEADER)
708         cp $(srcdir)/$(FPU_HOST_HEADER) $@
709
710 ## A 'normal' build shouldn't need to regenerate these
711 ## so we only include them in maintainer mode
712
713 if MAINTAINER_MODE
714 $(i_all_c): m4/all.m4 $(I_M4_DEPS2)
715         $(M4) -Dfile=$@ -I$(srcdir)/m4 all.m4 > $@
716
717 $(i_any_c): m4/any.m4 $(I_M4_DEPS2)
718         $(M4) -Dfile=$@ -I$(srcdir)/m4 any.m4 > $@
719
720 $(i_count_c): m4/count.m4 $(I_M4_DEPS2)
721         $(M4) -Dfile=$@ -I$(srcdir)/m4 count.m4 > $@
722
723 $(i_maxloc0_c): m4/maxloc0.m4 $(I_M4_DEPS0)
724         $(M4) -Dfile=$@ -I$(srcdir)/m4 maxloc0.m4 > $@
725
726 $(i_maxloc1_c): m4/maxloc1.m4 $(I_M4_DEPS1)
727         $(M4) -Dfile=$@ -I$(srcdir)/m4 maxloc1.m4 > $@
728
729 $(i_maxval_c): m4/maxval.m4 $(I_M4_DEPS1)
730         $(M4) -Dfile=$@ -I$(srcdir)/m4 maxval.m4 > $@
731
732 $(i_minloc0_c): m4/minloc0.m4 $(I_M4_DEPS0)
733         $(M4) -Dfile=$@ -I$(srcdir)/m4 minloc0.m4 > $@
734
735 $(i_minloc1_c): m4/minloc1.m4 $(I_M4_DEPS1)
736         $(M4) -Dfile=$@ -I$(srcdir)/m4 minloc1.m4 > $@
737
738 $(i_minval_c): m4/minval.m4 $(I_M4_DEPS1)
739         $(M4) -Dfile=$@ -I$(srcdir)/m4 minval.m4 > $@
740
741 $(i_product_c): m4/product.m4 $(I_M4_DEPS1)
742         $(M4) -Dfile=$@ -I$(srcdir)/m4 product.m4 > $@
743
744 $(i_sum_c): m4/sum.m4 $(I_M4_DEPS1)
745         $(M4) -Dfile=$@ -I$(srcdir)/m4 sum.m4 > $@
746
747 $(i_matmul_c): m4/matmul.m4 $(I_M4_DEPS)
748         $(M4) -Dfile=$@ -I$(srcdir)/m4 matmul.m4 > $@
749
750 $(i_matmull_c): m4/matmull.m4 $(I_M4_DEPS)
751         $(M4) -Dfile=$@ -I$(srcdir)/m4 matmull.m4 > $@
752
753 $(i_transpose_c): m4/transpose.m4 $(I_M4_DEPS)
754         $(M4) -Dfile=$@ -I$(srcdir)/m4 transpose.m4 > $@
755
756 $(i_shape_c): m4/shape.m4 $(I_M4_DEPS)
757         $(M4) -Dfile=$@ -I$(srcdir)/m4 shape.m4 > $@
758
759 $(i_reshape_c): m4/reshape.m4 $(I_M4_DEPS)
760         $(M4) -Dfile=$@ -I$(srcdir)/m4 reshape.m4 > $@
761
762 $(i_eoshift1_c): m4/eoshift1.m4 $(I_M4_DEPS)
763         $(M4) -Dfile=$@ -I$(srcdir)/m4 eoshift1.m4 > $@
764
765 $(i_eoshift3_c): m4/eoshift3.m4 $(I_M4_DEPS)
766         $(M4) -Dfile=$@ -I$(srcdir)/m4 eoshift3.m4 > $@
767
768 $(i_cshift1_c): m4/cshift1.m4 $(I_M4_DEPS)
769         $(M4) -Dfile=$@ -I$(srcdir)/m4 cshift1.m4 > $@
770
771 $(in_pack_c): m4/in_pack.m4 $(I_M4_DEPS)
772         $(M4) -Dfile=$@ -I$(srcdir)/m4 in_pack.m4 > $@
773
774 $(in_unpack_c): m4/in_unpack.m4 $(I_M4_DEPS)
775         $(M4) -Dfile=$@ -I$(srcdir)/m4 in_unpack.m4 > $@
776
777 $(i_exponent_c): m4/exponent.m4 m4/mtype.m4
778         $(M4) -Dfile=$@ -I$(srcdir)/m4 exponent.m4 > $@
779
780 $(i_rrspacing_c): m4/rrspacing.m4 m4/mtype.m4
781         $(M4) -Dfile=$@ -I$(srcdir)/m4 rrspacing.m4 > $@
782
783 $(i_spacing_c): m4/spacing.m4 m4/mtype.m4
784         $(M4) -Dfile=$@ -I$(srcdir)/m4 spacing.m4 > $@
785
786 $(i_fraction_c): m4/fraction.m4 m4/mtype.m4
787         $(M4) -Dfile=$@ -I$(srcdir)/m4 fraction.m4 > $@
788
789 $(i_nearest_c): m4/nearest.m4 m4/mtype.m4
790         $(M4) -Dfile=$@ -I$(srcdir)/m4 nearest.m4 > $@
791
792 $(i_set_exponent_c): m4/set_exponent.m4 m4/mtype.m4
793         $(M4) -Dfile=$@ -I$(srcdir)/m4 set_exponent.m4 > $@
794
795 $(i_pow_c): m4/pow.m4 $(I_M4_DEPS)
796         $(M4) -Dfile=$@ -I$(srcdir)/m4 pow.m4 > $@
797
798 $(gfor_built_specific_src): m4/specific.m4 m4/head.m4
799         $(M4) -Dfile=$@ -I$(srcdir)/m4 specific.m4 > $@
800
801 $(gfor_built_specific2_src): m4/specific2.m4 m4/head.m4
802         $(M4) -Dfile=$@ -I$(srcdir)/m4 specific2.m4 > $@
803
804 $(gfor_misc_specifics): m4/misc_specifics.m4 m4/head.m4
805         $(M4) -Dfile=$@ -I$(srcdir)/m4 misc_specifics.m4 > $@
806 ## end of maintainer mode only rules
807 endif
808
809 EXTRA_DIST = $(m4_files)