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