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