OSDN Git Service

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