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