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