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