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