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