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