OSDN Git Service

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