]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/Makefile.am
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / bfd / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2 #
3 # Copyright (C) 2012-2020 Free Software Foundation, Inc.
4 #
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
18 #
19
20 AUTOMAKE_OPTIONS = no-dist foreign
21 ACLOCAL_AMFLAGS = -I . -I .. -I ../config
22
23 INCDIR = $(srcdir)/../include
24 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
25
26 SUBDIRS = doc po
27
28 bfddocdir = doc
29
30 libbfd_la_LDFLAGS =
31 if INSTALL_LIBBFD
32 bfdlibdir = @bfdlibdir@
33 bfdincludedir = @bfdincludedir@
34 bfdlib_LTLIBRARIES = libbfd.la
35 bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
36 bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
37 else !INSTALL_LIBBFD
38 # Empty these so that the respective installation directories will not be created.
39 bfdlibdir =
40 bfdincludedir =
41 bfdinclude_HEADERS =
42 rpath_bfdlibdir = @bfdlibdir@
43 noinst_LTLIBRARIES = libbfd.la
44 libbfd_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
45 endif
46
47 # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
48 # -I../zlib, unless we were configured with --with-system-zlib, in which
49 # case both are empty.
50 ZLIB = @zlibdir@ -lz
51 ZLIBINC = @zlibinc@
52
53 WARN_CFLAGS = @WARN_CFLAGS@
54 NO_WERROR = @NO_WERROR@
55 AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
56 AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DLIBDIR='"$(libdir)"'
57 if PLUGINS
58 bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
59 LIBDL = @lt_cv_dlopen_libs@
60 endif
61
62 # bfd.h goes here, for now
63 BFD_H = bfd.h
64
65 # Jim Kingdon notes:
66 # Writing S-records should be included in all (or at least most)
67 # *-*-coff, *-*-aout, etc., configurations, because people will want to
68 # be able to use objcopy to create S-records. (S-records are not useful
69 # for the debugger, so if you are downloading things as S-records you
70 # need two copies of the executable, one to download and one for the
71 # debugger).
72 BFD32_LIBS = \
73 archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo \
74 coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo \
75 hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \
76 section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo \
77 binary.lo ihex.lo srec.lo tekhex.lo verilog.lo
78
79 BFD64_LIBS = archive64.lo
80
81 BFD32_LIBS_CFILES = \
82 archive.c archures.c bfd.c bfdio.c bfdwin.c cache.c coff-bfd.c \
83 compress.c corefile.c elf-properties.c format.c hash.c \
84 init.c libbfd.c linker.c merge.c opncls.c reloc.c \
85 section.c simple.c stab-syms.c stabs.c syms.c targets.c \
86 binary.c ihex.c srec.c tekhex.c verilog.c
87
88 BFD64_LIBS_CFILES = archive64.c
89
90 # This list is alphabetized to make it easier to keep in sync
91 # with the decls and initializer in archures.c.
92 ALL_MACHINES = \
93 cpu-aarch64.lo \
94 cpu-alpha.lo \
95 cpu-arc.lo \
96 cpu-arm.lo \
97 cpu-avr.lo \
98 cpu-bfin.lo \
99 cpu-bpf.lo \
100 cpu-cr16.lo \
101 cpu-cris.lo \
102 cpu-crx.lo \
103 cpu-csky.lo \
104 cpu-d10v.lo \
105 cpu-d30v.lo \
106 cpu-dlx.lo \
107 cpu-epiphany.lo \
108 cpu-fr30.lo \
109 cpu-frv.lo \
110 cpu-ft32.lo \
111 cpu-h8300.lo \
112 cpu-hppa.lo \
113 cpu-i386.lo \
114 cpu-iamcu.lo \
115 cpu-l1om.lo \
116 cpu-k1om.lo \
117 cpu-ia64.lo \
118 cpu-ip2k.lo \
119 cpu-iq2000.lo \
120 cpu-lm32.lo \
121 cpu-m10200.lo \
122 cpu-m10300.lo \
123 cpu-m32c.lo \
124 cpu-m32r.lo \
125 cpu-m68hc11.lo \
126 cpu-m68hc12.lo \
127 cpu-m9s12x.lo \
128 cpu-s12z.lo \
129 cpu-m9s12xg.lo \
130 cpu-m68k.lo \
131 cpu-mcore.lo \
132 cpu-mep.lo \
133 cpu-metag.lo \
134 cpu-microblaze.lo \
135 cpu-mips.lo \
136 cpu-mmix.lo \
137 cpu-moxie.lo \
138 cpu-msp430.lo \
139 cpu-mt.lo \
140 cpu-nds32.lo \
141 cpu-nfp.lo \
142 cpu-nios2.lo \
143 cpu-ns32k.lo \
144 cpu-or1k.lo \
145 cpu-pdp11.lo \
146 cpu-pj.lo \
147 cpu-powerpc.lo \
148 cpu-pru.lo \
149 cpu-rs6000.lo \
150 cpu-riscv.lo \
151 cpu-rl78.lo \
152 cpu-rx.lo \
153 cpu-s390.lo \
154 cpu-score.lo \
155 cpu-sh.lo \
156 cpu-sparc.lo \
157 cpu-spu.lo \
158 cpu-tic30.lo \
159 cpu-tic4x.lo \
160 cpu-tic54x.lo \
161 cpu-tic6x.lo \
162 cpu-tilegx.lo \
163 cpu-tilepro.lo \
164 cpu-v850.lo \
165 cpu-v850_rh850.lo \
166 cpu-vax.lo \
167 cpu-visium.lo \
168 cpu-wasm32.lo \
169 cpu-xc16x.lo \
170 cpu-xgate.lo \
171 cpu-xstormy16.lo \
172 cpu-xtensa.lo \
173 cpu-z80.lo \
174 cpu-z8k.lo
175
176 ALL_MACHINES_CFILES = \
177 cpu-aarch64.c \
178 cpu-alpha.c \
179 cpu-arc.c \
180 cpu-arm.c \
181 cpu-avr.c \
182 cpu-bfin.c \
183 cpu-bpf.c \
184 cpu-cr16.c \
185 cpu-cris.c \
186 cpu-crx.c \
187 cpu-csky.c \
188 cpu-d10v.c \
189 cpu-d30v.c \
190 cpu-dlx.c \
191 cpu-epiphany.c \
192 cpu-fr30.c \
193 cpu-frv.c \
194 cpu-ft32.c \
195 cpu-h8300.c \
196 cpu-hppa.c \
197 cpu-i386.c \
198 cpu-iamcu.c \
199 cpu-l1om.c \
200 cpu-k1om.c \
201 cpu-ia64.c \
202 cpu-ip2k.c \
203 cpu-iq2000.c \
204 cpu-lm32.c \
205 cpu-m10200.c \
206 cpu-m10300.c \
207 cpu-m32c.c \
208 cpu-m32r.c \
209 cpu-m68hc11.c \
210 cpu-m68hc12.c \
211 cpu-m9s12x.c \
212 cpu-s12z.c \
213 cpu-m9s12xg.c \
214 cpu-m68k.c \
215 cpu-mcore.c \
216 cpu-mep.c \
217 cpu-metag.c \
218 cpu-microblaze.c \
219 cpu-mips.c \
220 cpu-mmix.c \
221 cpu-moxie.c \
222 cpu-msp430.c \
223 cpu-mt.c \
224 cpu-nds32.c \
225 cpu-nfp.c \
226 cpu-ns32k.c \
227 cpu-nios2.c \
228 cpu-or1k.c \
229 cpu-pdp11.c \
230 cpu-pj.c \
231 cpu-powerpc.c \
232 cpu-pru.c \
233 cpu-rs6000.c \
234 cpu-riscv.c \
235 cpu-rl78.c \
236 cpu-rx.c \
237 cpu-s390.c \
238 cpu-score.c \
239 cpu-sh.c \
240 cpu-sparc.c \
241 cpu-spu.c \
242 cpu-tic30.c \
243 cpu-tic4x.c \
244 cpu-tic54x.c \
245 cpu-tic6x.c \
246 cpu-tilegx.c \
247 cpu-tilepro.c \
248 cpu-v850.c \
249 cpu-v850_rh850.c \
250 cpu-vax.c \
251 cpu-visium.c \
252 cpu-wasm32.c \
253 cpu-xc16x.c \
254 cpu-xgate.c \
255 cpu-xstormy16.c \
256 cpu-xtensa.c \
257 cpu-z80.c \
258 cpu-z8k.c
259
260 # The .o files needed by all of the 32 bit vectors that are configured into
261 # target_vector in targets.c if configured with --enable-targets=all.
262 BFD32_BACKENDS = \
263 aout-cris.lo \
264 aout-ns32k.lo \
265 aout-tic30.lo \
266 aout32.lo \
267 cf-i386lynx.lo \
268 coff-go32.lo \
269 coff-i386.lo \
270 coff-mips.lo \
271 coff-rs6000.lo \
272 coff-sh.lo \
273 coff-stgo32.lo \
274 coff-tic30.lo \
275 coff-tic4x.lo \
276 coff-tic54x.lo \
277 coff-z80.lo \
278 coff-z8k.lo \
279 coffgen.lo \
280 cofflink.lo \
281 dwarf1.lo \
282 dwarf2.lo \
283 ecoff.lo \
284 ecofflink.lo \
285 elf-attrs.lo \
286 elf-eh-frame.lo \
287 elf-ifunc.lo \
288 elf-m10200.lo \
289 elf-m10300.lo \
290 elf-nacl.lo \
291 elf-strtab.lo \
292 elf-vxworks.lo \
293 elf.lo \
294 elf32-am33lin.lo \
295 elf32-arc.lo \
296 elf32-arm.lo \
297 elf32-avr.lo \
298 elf32-bfin.lo \
299 elf32-cr16.lo \
300 elf32-cris.lo \
301 elf32-crx.lo \
302 elf32-csky.lo \
303 elf32-d10v.lo \
304 elf32-d30v.lo \
305 elf32-dlx.lo \
306 elf32-epiphany.lo \
307 elf32-fr30.lo \
308 elf32-frv.lo \
309 elf32-ft32.lo \
310 elf32-gen.lo \
311 elf32-h8300.lo \
312 elf32-hppa.lo \
313 elf32-i386.lo \
314 elfxx-x86.lo \
315 elf32-ip2k.lo \
316 elf32-iq2000.lo \
317 elf32-lm32.lo \
318 elf32-m32c.lo \
319 elf32-m32r.lo \
320 elf32-m68hc11.lo \
321 elf32-m68hc12.lo \
322 elf32-m68hc1x.lo \
323 elf32-m68k.lo \
324 elf32-s12z.lo \
325 elf32-mcore.lo \
326 elf32-mep.lo \
327 elf32-metag.lo \
328 elf32-microblaze.lo \
329 elf32-moxie.lo \
330 elf32-msp430.lo \
331 elf32-mt.lo \
332 elf32-nds32.lo \
333 elf32-nios2.lo \
334 elf32-or1k.lo \
335 elf32-pj.lo \
336 elf32-ppc.lo \
337 elf32-pru.lo \
338 elf32-rl78.lo \
339 elf32-rx.lo \
340 elf32-s390.lo \
341 elf32-sh.lo \
342 elf32-sparc.lo \
343 elf32-spu.lo \
344 elf32-tic6x.lo \
345 elf32-tilegx.lo \
346 elf32-tilepro.lo \
347 elf32-v850.lo \
348 elf32-vax.lo \
349 elf32-visium.lo \
350 elf32-wasm32.lo \
351 elf32-xc16x.lo \
352 elf32-xgate.lo \
353 elf32-xstormy16.lo \
354 elf32-xtensa.lo \
355 elf32-z80.lo \
356 elf32.lo \
357 elflink.lo \
358 elfxx-sparc.lo \
359 elfxx-tilegx.lo \
360 i386aout.lo \
361 i386bsd.lo \
362 i386lynx.lo \
363 i386msdos.lo \
364 mach-o.lo \
365 mach-o-i386.lo \
366 mach-o-arm.lo \
367 ns32knetbsd.lo \
368 pc532-mach.lo \
369 pdp11.lo \
370 pe-arm-wince.lo \
371 pe-arm.lo \
372 pe-i386.lo \
373 pe-mcore.lo \
374 pe-ppc.lo \
375 pe-sh.lo \
376 pef.lo \
377 pei-arm-wince.lo \
378 pei-arm.lo \
379 pei-i386.lo \
380 pei-mcore.lo \
381 pei-ppc.lo \
382 pei-sh.lo \
383 peigen.lo \
384 plugin.lo \
385 ppcboot.lo \
386 reloc16.lo \
387 som.lo \
388 vax1knetbsd.lo \
389 vaxnetbsd.lo \
390 vms-lib.lo \
391 vms-misc.lo \
392 wasm-module.lo \
393 xcofflink.lo \
394 xsym.lo \
395 xtensa-isa.lo \
396 xtensa-modules.lo
397
398 BFD32_BACKENDS_CFILES = \
399 aout-cris.c \
400 aout-ns32k.c \
401 aout-tic30.c \
402 aout32.c \
403 cf-i386lynx.c \
404 coff-go32.c \
405 coff-i386.c \
406 coff-mips.c \
407 coff-rs6000.c \
408 coff-sh.c \
409 coff-stgo32.c \
410 coff-tic30.c \
411 coff-tic4x.c \
412 coff-tic54x.c \
413 coff-z80.c \
414 coff-z8k.c \
415 coffgen.c \
416 cofflink.c \
417 dwarf1.c \
418 dwarf2.c \
419 ecoff.c \
420 ecofflink.c \
421 elf-attrs.c \
422 elf-eh-frame.c \
423 elf-ifunc.c \
424 elf-m10200.c \
425 elf-m10300.c \
426 elf-nacl.c \
427 elf-strtab.c \
428 elf-vxworks.c \
429 elf.c \
430 elf32-am33lin.c \
431 elf32-arc.c \
432 elf32-arm.c \
433 elf32-avr.c \
434 elf32-bfin.c \
435 elf32-cr16.c \
436 elf32-cris.c \
437 elf32-crx.c \
438 elf32-csky.c \
439 elf32-d10v.c \
440 elf32-d30v.c \
441 elf32-dlx.c \
442 elf32-epiphany.c \
443 elf32-fr30.c \
444 elf32-frv.c \
445 elf32-ft32.c \
446 elf32-gen.c \
447 elf32-h8300.c \
448 elf32-hppa.c \
449 elf32-i386.c \
450 elfxx-x86.c \
451 elf32-ip2k.c \
452 elf32-iq2000.c \
453 elf32-lm32.c \
454 elf32-m32c.c \
455 elf32-m32r.c \
456 elf32-m68hc11.c \
457 elf32-m68hc12.c \
458 elf32-m68hc1x.c \
459 elf32-m68k.c \
460 elf32-s12z.c \
461 elf32-mcore.c \
462 elf32-mep.c \
463 elf32-metag.c \
464 elf32-microblaze.c \
465 elf32-moxie.c \
466 elf32-msp430.c \
467 elf32-mt.c \
468 elf32-nds32.c \
469 elf32-nios2.c \
470 elf32-or1k.c \
471 elf32-pj.c \
472 elf32-ppc.c \
473 elf32-pru.c \
474 elf32-rl78.c \
475 elf32-rx.c \
476 elf32-s390.c \
477 elf32-sh.c \
478 elf32-sparc.c \
479 elf32-spu.c \
480 elf32-tic6x.c \
481 elf32-tilegx.c \
482 elf32-tilepro.c \
483 elf32-v850.c \
484 elf32-vax.c \
485 elf32-visium.c \
486 elf32-wasm32.c \
487 elf32-xc16x.c \
488 elf32-xgate.c \
489 elf32-xstormy16.c \
490 elf32-xtensa.c \
491 elf32-z80.c \
492 elf32.c \
493 elflink.c \
494 elfxx-sparc.c \
495 elfxx-tilegx.c \
496 i386aout.c \
497 i386bsd.c \
498 i386lynx.c \
499 i386msdos.c \
500 mach-o.c \
501 mach-o-i386.c \
502 mach-o-arm.c \
503 ns32knetbsd.c \
504 pc532-mach.c \
505 pdp11.c \
506 pe-arm-wince.c \
507 pe-arm.c \
508 pe-i386.c \
509 pe-mcore.c \
510 pe-ppc.c \
511 pe-sh.c \
512 pef.c \
513 pei-arm-wince.c \
514 pei-arm.c \
515 pei-i386.c \
516 pei-mcore.c \
517 pei-ppc.c \
518 pei-sh.c \
519 plugin.c \
520 ppcboot.c \
521 reloc16.c \
522 som.c \
523 vax1knetbsd.c \
524 vaxnetbsd.c \
525 vms-lib.c \
526 vms-misc.c \
527 wasm-module.c \
528 xcofflink.c \
529 xsym.c \
530 xtensa-isa.c \
531 xtensa-modules.c
532
533 # The .o files needed by all of the 64 bit vectors that are configured into
534 # target_vector in targets.c if configured with --enable-targets=all
535 # and --enable-64-bit-bfd.
536 # elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in
537 # BFD32_BACKENDS.
538 BFD64_BACKENDS = \
539 elf32-aarch64.lo \
540 elf64-aarch64.lo \
541 elfxx-aarch64.lo \
542 aix5ppc-core.lo \
543 aout64.lo \
544 coff-alpha.lo \
545 coff-x86_64.lo \
546 coff64-rs6000.lo \
547 elf32-ia64.lo \
548 elf32-mips.lo \
549 elf32-score.lo \
550 elf32-score7.lo \
551 elf64-alpha.lo \
552 elf64-gen.lo \
553 elf64-hppa.lo \
554 elf64-ia64.lo \
555 elf64-ia64-vms.lo \
556 elfxx-ia64.lo \
557 elfn32-mips.lo \
558 elf64-mips.lo \
559 elfxx-mips.lo \
560 elf64-mmix.lo \
561 elf64-nfp.lo \
562 elf64-ppc.lo \
563 elf32-riscv.lo \
564 elf64-riscv.lo \
565 elfxx-riscv.lo \
566 elf64-s390.lo \
567 elf64-sparc.lo \
568 elf64-tilegx.lo \
569 elf64-x86-64.lo \
570 elfxx-x86.lo \
571 elf64-bpf.lo \
572 elf64.lo \
573 mach-o-aarch64.lo \
574 mach-o-x86-64.lo \
575 mmo.lo \
576 pe-x86_64.lo \
577 pei-ia64.lo \
578 pei-x86_64.lo \
579 pepigen.lo \
580 pex64igen.lo \
581 vms-alpha.lo
582
583 BFD64_BACKENDS_CFILES = \
584 aix5ppc-core.c \
585 aout64.c \
586 coff-alpha.c \
587 coff-x86_64.c \
588 coff64-rs6000.c \
589 elf32-mips.c \
590 elf32-score.c \
591 elf32-score7.c \
592 elf64-alpha.c \
593 elf64-gen.c \
594 elf64-hppa.c \
595 elf64-ia64-vms.c \
596 elf64-mips.c \
597 elf64-mmix.c \
598 elf64-nfp.c \
599 elf64-ppc.c \
600 elf64-s390.c \
601 elf64-sparc.c \
602 elf64-tilegx.c \
603 elf64-x86-64.c \
604 elfxx-x86.c \
605 elf64-bpf.c \
606 elf64.c \
607 elfn32-mips.c \
608 elfxx-aarch64.c \
609 elfxx-ia64.c \
610 elfxx-mips.c \
611 elfxx-riscv.c \
612 mach-o-aarch64.c \
613 mach-o-x86-64.c \
614 mmo.c \
615 pe-x86_64.c \
616 pei-ia64.c \
617 pei-x86_64.c \
618 vms-alpha.c
619
620 OPTIONAL_BACKENDS = \
621 aix386-core.lo \
622 cisco-core.lo \
623 hpux-core.lo \
624 irix-core.lo \
625 lynx-core.lo \
626 netbsd-core.lo \
627 osf-core.lo \
628 rs6000-core.lo \
629 sco5-core.lo \
630 trad-core.lo
631
632 OPTIONAL_BACKENDS_CFILES = \
633 aix386-core.c \
634 cisco-core.c \
635 hpux-core.c \
636 irix-core.c \
637 lynx-core.c \
638 netbsd-core.c \
639 osf-core.c \
640 rs6000-core.c \
641 sco5-core.c \
642 trad-core.c
643
644 # Reconfigure if config.bfd or configure.host changes.
645 # development.sh is used to determine -Werror default.
646 CONFIG_STATUS_DEPENDENCIES = \
647 $(srcdir)/config.bfd \
648 $(srcdir)/configure.host \
649 $(srcdir)/development.sh
650
651 # These are defined by configure:
652 WORDSIZE = @wordsize@
653 ALL_BACKENDS = @all_backends@
654 BFD_BACKENDS = @bfd_backends@
655 BFD_MACHINES = @bfd_machines@
656 TDEFAULTS = @tdefaults@
657 HAVEVECS = @havevecs@
658
659 AM_CPPFLAGS += @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) \
660 $(HAVEVECS) @INCINTL@
661
662 # C source files that correspond to .o's.
663 SOURCE_CFILES = \
664 $(BFD32_LIBS_CFILES) \
665 $(BFD64_LIBS_CFILES) \
666 $(ALL_MACHINES_CFILES) \
667 $(BFD32_BACKENDS_CFILES) \
668 $(BFD64_BACKENDS_CFILES) \
669 $(OPTIONAL_BACKENDS_CFILES)
670
671 BUILD_CFILES = \
672 elf32-aarch64.c elf64-aarch64.c \
673 elf32-ia64.c elf64-ia64.c \
674 elf32-riscv.c elf64-riscv.c \
675 peigen.c pepigen.c pex64igen.c
676
677 CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
678
679 ## This is a list of all .h files in the source tree minus those that
680 ## are processed to produce other .h files
681 SOURCE_HFILES = \
682 aout-target.h aoutx.h arc-got.h arc-plt.h \
683 coff-arm.h coff-bfd.h coffcode.h coffswap.h \
684 cpu-aarch64.h cpu-arm.h cpu-h8300.h cpu-m68k.h \
685 ecoff-bfd.h ecoffswap.h \
686 elf32-arm.h elf32-avr.h elf32-bfin.h elf32-cr16.h elf32-csky.h \
687 elf32-dlx.h elf32-hppa.h elf32-m68hc1x.h elf32-m68k.h \
688 elf32-metag.h elf32-nds32.h elf32-nios2.h elf32-ppc.h \
689 elf32-rx.h elf32-score.h elf32-sh-relocs.h elf32-spu.h \
690 elf32-tic6x.h elf32-tilegx.h elf32-tilepro.h elf32-v850.h \
691 elf64-hppa.h elf64-ppc.h elf64-tilegx.h \
692 elf-bfd.h elfcode.h elfcore.h elf-hppa.h elf-linker-x86.h \
693 elf-linux-core.h elf-nacl.h elf-s390.h elf-vxworks.h \
694 elfxx-aarch64.h elfxx-ia64.h elfxx-mips.h elfxx-riscv.h \
695 elfxx-sparc.h elfxx-tilegx.h elfxx-x86.h \
696 genlink.h go32stub.h \
697 libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
698 libpei.h libxcoff.h \
699 mach-o.h \
700 netbsd.h ns32k.h \
701 pef.h pef-traceback.h peicode.h plugin.h \
702 som.h sysdep.h \
703 version.h vms.h \
704 wasm-module.h \
705 xcofflink.h xsym.h
706
707 ## ... and .h files which are in the build tree, minus config.h and bfd.h
708 BUILD_HFILES = \
709 bfdver.h elf32-target.h elf64-target.h targmatch.h bfd_stdint.h
710
711 # Ensure they are built early:
712 BUILT_SOURCES = $(BUILD_HFILES)
713
714 HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
715
716 SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES)
717 BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
718
719 po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
720 for file in $(SRC_POTFILES); do echo $$file; done \
721 | LC_ALL=C sort > tmp.src \
722 && mv tmp.src $(srcdir)/po/SRC-POTFILES.in
723
724 po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
725 for file in $(BLD_POTFILES); do echo $$file; done \
726 | LC_ALL=C sort > tmp.bld \
727 && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
728
729 all diststuff: info
730
731 # Various kinds of .o files to put in libbfd.a:
732 # BFD_BACKENDS Routines the configured targets need.
733 # BFD_MACHINES Architecture-specific routines the configured targets need.
734 # COREFILE Core file routines for a native configuration
735 # bfd64_libs Routines for 64bit support
736 OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ @bfd64_libs@
737
738 stamp-ofiles: Makefile
739 rm -f tofiles
740 f=""; \
741 for i in $(OFILES) ; do \
742 case " $$f " in \
743 *" $$i "*) ;; \
744 *) f="$$f $$i" ;; \
745 esac ; \
746 done ; \
747 echo $$f > tofiles
748 $(SHELL) $(srcdir)/../move-if-change tofiles ofiles
749 touch stamp-ofiles
750
751 ofiles: stamp-ofiles ; @true
752
753 # Since BFD64_LIBS is optional and we can't have substitution in
754 # libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead.
755 # However, list all sources in EXTRA_libbfd_la_SOURCES so the
756 # dependency tracking fragments are picked up in the Makefile.
757 libbfd_la_SOURCES = $(BFD32_LIBS_CFILES)
758 EXTRA_libbfd_la_SOURCES = $(CFILES)
759 libbfd_la_DEPENDENCIES = $(OFILES) ofiles
760 libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB)
761 libbfd_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@
762
763 # libtool will build .libs/libbfd.a. We create libbfd.a in the build
764 # directory so that we don't have to convert all the programs that use
765 # libbfd.a simultaneously. This is a hack which should be removed if
766 # everything else starts using libtool. FIXME.
767
768 noinst_LIBRARIES = libbfd.a
769 libbfd_a_SOURCES =
770
771 stamp-lib: libbfd.la
772 libtooldir=`$(LIBTOOL) --config | $(SED) -n -e 's/^objdir=//p'`; \
773 if [ -f $$libtooldir/libbfd.a ]; then \
774 cp $$libtooldir/libbfd.a libbfd.tmp; \
775 $(RANLIB) libbfd.tmp; \
776 $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
777 else true; fi
778 touch stamp-lib
779
780 libbfd.a: stamp-lib ; @true
781
782 # This file holds an array associating configuration triplets and
783 # vector names. It is built from config.bfd. It is not compiled by
784 # itself, but is included by targets.c.
785 targmatch.h: config.bfd targmatch.sed
786 rm -f targmatch.h
787 $(SED) -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
788 mv -f targmatch.new targmatch.h
789
790 # When compiling archures.c and targets.c, supply the default target
791 # info from configure.
792
793 targets.lo: targets.c Makefile
794 if am__fastdepCC
795 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c
796 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
797 else
798 if AMDEP
799 source='targets.c' object='$@' libtool=yes @AMDEPBACKSLASH@
800 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
801 endif
802 $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c
803 endif
804
805 archures.lo: archures.c Makefile
806 if am__fastdepCC
807 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c
808 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
809 else
810 if AMDEP
811 source='archures.c' object='$@' libtool=yes @AMDEPBACKSLASH@
812 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
813 endif
814 $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c
815 endif
816
817 dwarf2.lo: dwarf2.c Makefile
818 if am__fastdepCC
819 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c
820 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
821 else
822 if AMDEP
823 source='dwarf2.c' object='$@' libtool=yes @AMDEPBACKSLASH@
824 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
825 endif
826 $(LTCOMPILE) -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c
827 endif
828
829 elf32-target.h : elfxx-target.h
830 $(SED) -e s/NN/32/g < $< > $@
831
832 elf64-target.h : elfxx-target.h
833 $(SED) -e s/NN/64/g < $< > $@
834
835 elf32-aarch64.c : elfnn-aarch64.c
836 echo "#line 1 \"elfnn-aarch64.c\"" > $@
837 $(SED) -e s/NN/32/g < $< >> $@
838
839 elf64-aarch64.c : elfnn-aarch64.c
840 echo "#line 1 \"elfnn-aarch64.c\"" > $@
841 $(SED) -e s/NN/64/g < $< >> $@
842
843 elf32-ia64.c : elfnn-ia64.c
844 echo "#line 1 \"elfnn-ia64.c\"" > $@
845 $(SED) -e s/NN/32/g < $< >> $@
846
847 elf64-ia64.c : elfnn-ia64.c
848 echo "#line 1 \"elfnn-ia64.c\"" > $@
849 $(SED) -e s/NN/64/g < $< >> $@
850
851 elf32-riscv.c : elfnn-riscv.c
852 echo "#line 1 \"elfnn-riscv.c\"" > $@
853 $(SED) -e s/NN/32/g < $< >> $@
854
855 elf64-riscv.c : elfnn-riscv.c
856 echo "#line 1 \"elfnn-riscv.c\"" > $@
857 $(SED) -e s/NN/64/g < $< >> $@
858
859 peigen.c : peXXigen.c
860 echo "#line 1 \"peXXigen.c\"" > $@
861 $(SED) -e s/XX/pe/g < $< >> $@
862
863 pepigen.c : peXXigen.c
864 echo "#line 1 \"peXXigen.c\"" > $@
865 $(SED) -e s/XX/pep/g < $< >> $@
866
867 pex64igen.c: peXXigen.c
868 echo "#line 1 \"peXXigen.c\"" > $@
869 $(SED) -e s/XX/pex64/g < $< >> $@
870
871 BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/diagnostics.h
872 LOCAL_H_DEPS= libbfd.h sysdep.h config.h bfd_stdint.h
873 $(BFD32_LIBS) \
874 $(BFD64_LIBS) \
875 $(ALL_MACHINES) \
876 $(BFD32_BACKENDS) \
877 $(BFD64_BACKENDS) \
878 $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
879
880 host-aout.lo: Makefile
881
882 # The following program can be used to generate a simple config file
883 # which can be folded into an h-XXX file for a new host, with some editing.
884 aout-params.h: gen-aout
885 ./gen-aout host > aout-params.h
886 gen-aout: $(srcdir)/gen-aout.c Makefile
887 $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c
888
889 $(BFD_H): stmp-bfd-h ; @true
890
891 stmp-bfd-h: bfd-in3.h
892 rm -f bfd-tmp.h
893 cp bfd-in3.h bfd-tmp.h
894 $(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H)
895 rm -f bfd-tmp.h
896 touch stmp-bfd-h
897
898 BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c \
899 bfdio.c bfdwin.c section.c archures.c reloc.c \
900 syms.c bfd.c archive.c corefile.c targets.c format.c \
901 linker.c simple.c compress.c
902 BFD64_H_FILES = archive64.c
903 LIBBFD_H_FILES = libbfd-in.h libbfd.c bfdio.c bfdwin.c \
904 cache.c reloc.c archures.c linker.c
905 LIBCOFF_H_FILES = libcoff-in.h coffcode.h
906
907 # Could really use a "copy-if-change"...
908 headers:
909 (cd $(bfddocdir); $(MAKE) protos $(FLAGS_TO_PASS))
910 cp $(bfddocdir)/bfd.h bfd-in2.h-new
911 $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
912 cp $(bfddocdir)/libbfd.h libbfd.h-new
913 $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
914 cp $(bfddocdir)/libcoff.h libcoff.h-new
915 $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
916
917 # We only rebuild the header files automatically if we have been
918 # configured with --enable-maintainer-mode.
919
920 $(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
921 stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES)
922 (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
923 cp $(bfddocdir)/bfd.h bfd-in2.h-new
924 $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
925 touch stmp-bin2-h
926
927 $(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true
928 stmp-lbfd-h: $(LIBBFD_H_FILES)
929 (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
930 cp $(bfddocdir)/libbfd.h libbfd.h-new
931 $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
932 touch stmp-lbfd-h
933
934 $(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true
935 stmp-lcoff-h: $(LIBCOFF_H_FILES)
936 (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
937 cp $(bfddocdir)/libcoff.h libcoff.h-new
938 $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
939 touch stmp-lcoff-h
940
941 MOSTLYCLEANFILES = ofiles stamp-ofiles
942
943 CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
944 stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
945
946 DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion
947
948 bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
949 @echo "creating $@"
950 @bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
951 bfd_version_string="\"$(VERSION)\"" ;\
952 bfd_soversion="$(VERSION)" ;\
953 bfd_version_package="\"$(PKGVERSION)\"" ;\
954 report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
955 . $(srcdir)/development.sh ;\
956 if test "$$development" = true ; then \
957 bfd_version_date=`$(SED) -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
958 bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
959 bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
960 fi ;\
961 $(SED) -e "s,@bfd_version@,$$bfd_version," \
962 -e "s,@bfd_version_string@,$$bfd_version_string," \
963 -e "s,@bfd_version_package@,$$bfd_version_package," \
964 -e "s,@report_bugs_to@,$$report_bugs_to," \
965 < $(srcdir)/version.h > $@; \
966 echo "$${bfd_soversion}" > libtool-soversion
967
968 # Disable -Werror, if it has been enabled, since coffswap.h won't
969 # compile with gcc 4.5 and above.
970 coff-tic4x.lo: coff-tic4x.c
971 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< $(NO_WERROR)
972 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
973 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
974 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
975 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< $(NO_WERROR)
976
977 coff-tic54x.lo: coff-tic54x.c
978 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< $(NO_WERROR)
979 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
980 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
981 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
982 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< $(NO_WERROR)