Makefile.am revision 89857
1## Process this file with automake to generate Makefile.in
2
3## FIXME: work around apparent automake bug.
4INTLLIBS = @INTLLIBS@
5
6AUTOMAKE_OPTIONS = cygnus dejagnu
7
8SUBDIRS = po
9
10tooldir = $(exec_prefix)/$(target_alias)
11
12YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
13YFLAGS = -d
14LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
15
16WARN_CFLAGS = @WARN_CFLAGS@
17AM_CFLAGS = $(WARN_CFLAGS)
18
19# We put the scripts in the directory $(scriptdir)/ldscripts.
20# We can't put the scripts in $(datadir) because the SEARCH_DIR
21# directives need to be different for native and cross linkers.
22scriptdir = $(tooldir)/lib
23
24EMUL = @EMUL@
25EMULATION_OFILES = @EMULATION_OFILES@
26EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
27
28# Search path to override the default search path for -lfoo libraries.
29# If LIB_PATH is empty, the ones in the script (if any) are left alone.
30# (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
31# a cross-linker, in which case the default is empty.  See genscripts.sh.)
32# Otherwise, they are replaced with the ones given in LIB_PATH,
33# which may have the form: LIB_PATH=/lib:/usr/local/lib
34LIB_PATH =
35
36BASEDIR = $(srcdir)/..
37BFDDIR = $(BASEDIR)/bfd
38INCDIR	= $(BASEDIR)/include
39MKDEP = gcc -MM
40
41# What version of the manual to build
42DOCVER = gen
43
44# Options to extract the man page from ld.texinfo
45MANCONF = -Dman
46
47TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
48
49POD2MAN = pod2man --center="GNU Development Tools" \
50	--release="binutils-$(VERSION)" --section=1
51
52#stuff for self hosting (can be overridden in config file).
53HOSTING_CRT0 = @HOSTING_CRT0@
54HOSTING_LIBS = @HOSTING_LIBS@
55HOSTING_EMU = -m $(EMUL)
56
57# Setup the testing framework, if you have one
58EXPECT = `if [ -f $$r/../expect/expect ] ; \
59	then echo $$r/../expect/expect ; \
60	else echo expect ; fi`
61
62RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
63	then echo $${srcroot}/../dejagnu/runtest ; \
64	else echo runtest ; fi`
65
66RUNTESTFLAGS =
67
68CC_FOR_TARGET = ` \
69  if [ -f $$r/../gcc/xgcc ] ; then \
70    if [ -f $$r/../newlib/Makefile ] ; then \
71      echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
72    else \
73      echo $$r/../gcc/xgcc -B$$r/../gcc/; \
74    fi; \
75  else \
76    if [ "@host@" = "@target@" ] ; then \
77      echo $(CC); \
78    else \
79      echo gcc | sed '$(transform)'; \
80    fi; \
81  fi`
82
83CXX = gcc
84CXX_FOR_TARGET = ` \
85  if [ -f $$r/../gcc/xgcc ] ; then \
86    if [ -f $$r/../newlib/Makefile ] ; then \
87      echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
88    else \
89      echo $$r/../gcc/xgcc -B$$r/../gcc/; \
90    fi; \
91  else \
92    if [ "@host@" = "@target@" ] ; then \
93      echo $(CXX); \
94    else \
95      echo gcc | sed '$(transform)'; \
96    fi; \
97  fi`
98
99noinst_PROGRAMS = ld-new
100info_TEXINFOS = ld.texinfo
101noinst_TEXINFOS = ldint.texinfo
102man_MANS = ld.1
103
104INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
105
106BFDLIB = ../bfd/libbfd.la
107LIBIBERTY = ../libiberty/libiberty.a
108
109ALL_EMULATIONS = \
110	ea29k.o \
111	eaixppc.o \
112	eaixrs6.o \
113	ealpha.o \
114	earcelf.o \
115	earm_epoc_pe.o \
116	earmaoutb.o \
117	earmaoutl.o \
118	earmcoff.o \
119	earmelf.o \
120	earmelf_linux.o \
121	earmelf_nbsd.o \
122	earmelf_oabi.o \
123	earmnbsd.o \
124	earmpe.o \
125	eavr1200.o \
126	eavr23xx.o \
127	eavr4433.o \
128	eavr44x4.o \
129	eavr85xx.o \
130	eavrmega103.o \
131	eavrmega161.o \
132	eavrmega603.o \
133	ecoff_sparc.o \
134	ecrisaout.o \
135	ecriself.o \
136	ecrislinux.o \
137	ed10velf.o \
138	ed30v_e.o \
139	ed30v_o.o \
140	ed30velf.o \
141	edelta68.o \
142	eebmon29k.o \
143	eelf32_i960.o \
144	eelf32_i860.o \
145	eelf32_sparc.o \
146	eelf32b4300.o \
147	eelf32bmip.o \
148	eelf32bmipn32.o \
149	eelf32btsmip.o \
150	eelf32ltsmip.o \
151	eelf32ebmip.o \
152	eelf32elmip.o \
153	eelf32fr30.o \
154	eelf32i370.o \
155	eelf32l4300.o \
156	eelf32lmip.o \
157	eelf32lppc.o \
158	eelf32lppcsim.o \
159	eelf32mcore.o \
160	eelf32openrisc.o \
161	eelf32ppc.o \
162	eelf32ppclinux.o \
163	eelf32ppcsim.o \
164	eelf32xstormy16.o \
165	eelf_i386.o \
166	eelf_i386_be.o \
167	eelf_i386_chaos.o \
168	eelf_i386_ldso.o \
169	eelf_s390.o \
170	egld960.o \
171	egld960coff.o \
172	eh8300.o \
173	eh8300h.o \
174	eh8300s.o \
175	eh8300elf.o \
176	eh8300helf.o \
177	eh8300self.o \
178	eh8500.o \
179	eh8500b.o \
180	eh8500c.o \
181	eh8500m.o \
182	eh8500s.o \
183	ehp300bsd.o \
184	ehp3hpux.o \
185	ehppaelf.o \
186	ehppalinux.o \
187	ei386aout.o \
188	ei386beos.o \
189	ei386bsd.o \
190	ei386coff.o \
191	ei386go32.o \
192	ei386linux.o \
193	ei386lynx.o \
194	ei386mach.o \
195	ei386moss.o \
196	ei386msdos.o \
197	ei386nbsd.o \
198	ei386nw.o \
199	ei386pe.o \
200	ei386pe_posix.o \
201	elnk960.o \
202	em68hc11elf.o \
203	em68hc11elfb.o \
204	em68hc12elf.o \
205	em68hc12elfb.o \
206	em68k4knbsd.o \
207	em68kaout.o \
208	em68kaux.o \
209	em68kcoff.o \
210	em68kelf.o \
211	em68kelfnbsd.o \
212	em68klinux.o \
213	em68klynx.o \
214	em68knbsd.o \
215	em68kpsos.o \
216	em88kbcs.o \
217	emcorepe.o \
218	emipsbig.o \
219	emipsbsd.o \
220	emipsidt.o \
221	emipsidtl.o \
222	emipslit.o \
223	emipslnews.o \
224	emipspe.o \
225	enews.o \
226	ens32knbsd.o \
227	epc532macha.o \
228	epdp11.o \
229	epjelf.o \
230	epjlelf.o \
231	eppcmacos.o \
232	eppcnw.o \
233	eppcpe.o \
234	eriscix.o \
235	esa29200.o \
236	esh.o \
237	eshelf.o \
238	eshelf_linux.o \
239	eshlelf_linux.o \
240	eshelf_nbsd.o \
241	eshlelf_nbsd.o \
242	eshl.o \
243	eshlelf.o \
244	eshpe.o \
245	esparcaout.o \
246	esparclinux.o \
247	esparclynx.o \
248	esparcnbsd.o \
249	est2000.o \
250	esun3.o \
251	esun4.o \
252	etic30aout.o \
253	etic30coff.o \
254	etic54xcoff.o \
255	etic80coff.o \
256	evanilla.o \
257	evax.o \
258	evsta.o \
259	ew65.o \
260	ez8001.o \
261	ez8002.o
262
263ALL_64_EMULATIONS = \
264	eelf64_aix.o \
265	eelf64_ia64.o \
266	eelf_x86_64.o \
267	eelf64_s390.o \
268	eelf64_sparc.o \
269	eelf64alpha.o \
270	eelf64alpha_nbsd.o \
271	eelf64bmip.o \
272	eelf64btsmip.o \
273	eelf64ltsmip.o \
274	eelf64hppa.o \
275	eelf64mmix.o \
276	emmo.o \
277	eelf64ppc.o \
278	eelf64lppc.o \
279	ehppa64linux.o
280
281ALL_EMUL_EXTRA_OFILES = \
282	deffilep.o \
283	pe-dll.o
284
285CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
286	ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
287	mri.c ldcref.c pe-dll.c
288
289HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
290	ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
291	ldwrite.h mri.h deffile.h pe-dll.h
292
293GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
294GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
295
296OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
297	ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o \
298	ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
299
300STAGESTUFF = *.o ldscripts/* e*.c
301
302# At the moment this is just a list of those emulation template files
303# that contain internationalised strings.
304EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
305
306POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
307
308po/POTFILES.in: @MAINT@ Makefile
309	for file in $(POTFILES); do echo $$file; done | sort > tmp \
310	  && mv tmp $(srcdir)/po/POTFILES.in
311
312ldmain.o: ldmain.c config.status
313	$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
314
315ldemul-list.h: Makefile
316	(echo "/* This file is automatically generated.  DO NOT EDIT! */";\
317	for f in `echo " " ${EMULATION_OFILES} "" \
318	 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
319	    echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
320	done;\
321	echo "";\
322	echo "#define EMULATION_LIST \\";\
323	for f in `echo " " ${EMULATION_OFILES} "" \
324	 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
325	    echo "  &ld_$${f}_emulation, \\"; \
326	done;\
327	echo "  0") >ldemul-tmp.h
328	mv ldemul-tmp.h ldemul-list.h
329
330stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
331	  cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
332
333# These all start with e so 'make clean' can find them.
334
335GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
336GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
337@TDIRS@
338
339ea29k.c: $(srcdir)/emulparams/a29k.sh \
340  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
341	${GENSCRIPTS} a29k "$(tdir_a29k)"
342eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
343  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
344	${GENSCRIPTS} aixppc "$(tdir_aixppc)"
345eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
346  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
347	${GENSCRIPTS} aixrs6 "$(tdir_aixrs6)"
348ealpha.c: $(srcdir)/emulparams/alpha.sh \
349  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
350	${GENSCRIPTS} alpha "$(tdir_alpha)"
351earcelf.c: $(srcdir)/emulparams/arcelf.sh \
352  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
353	${GENSCRIPTS} arcelf "$(tdir_arcelf)"
354earmelf.c: $(srcdir)/emulparams/armelf.sh \
355  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
356  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
357	${GENSCRIPTS} armelf "$(tdir_armelf)"
358earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
359  $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
360	${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
361earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
362  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
363  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
364	${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
365earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
366  $(srcdir)/emulparams/armelf.sh \
367  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
368  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
369	${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
370earmaoutb.c:	$(srcdir)/emulparams/armaoutb.sh \
371  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
372	${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
373earmaoutl.c:	$(srcdir)/emulparams/armaoutl.sh \
374  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
375	${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
376earmcoff.c:	$(srcdir)/emulparams/armcoff.sh \
377  $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
378	${GENSCRIPTS} armcoff "$(tdir_armcoff)"
379earmnbsd.c:	$(srcdir)/emulparams/armnbsd.sh \
380  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
381	${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
382earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
383  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
384	${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
385earmpe.c: $(srcdir)/emulparams/armpe.sh \
386  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
387	${GENSCRIPTS} armpe "$(tdir_armpe)"
388eavr85xx.c: $(srcdir)/emulparams/avr85xx.sh \
389  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
390  ${GEN_DEPENDS}
391	${GENSCRIPTS} avr85xx "$(tdir_avr85xx)"
392eavr1200.c: $(srcdir)/emulparams/avr1200.sh \
393  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
394  ${GEN_DEPENDS}
395	${GENSCRIPTS} avr1200 "$(tdir_avr85xx)"
396eavr23xx.c: $(srcdir)/emulparams/avr23xx.sh \
397  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
398  ${GEN_DEPENDS}
399	${GENSCRIPTS} avr23xx "$(tdir_avr85xx)"
400eavr44x4.c: $(srcdir)/emulparams/avr44x4.sh \
401  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
402  ${GEN_DEPENDS}
403	${GENSCRIPTS} avr44x4 "$(tdir_avr85xx)"
404eavr4433.c: $(srcdir)/emulparams/avr4433.sh \
405  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
406  ${GEN_DEPENDS}
407	${GENSCRIPTS} avr4433 "$(tdir_avr85xx)"
408eavrmega603.c: $(srcdir)/emulparams/avrmega603.sh \
409  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
410  ${GEN_DEPENDS}
411	${GENSCRIPTS} avrmega603 "$(tdir_avr85xx)"
412eavrmega103.c: $(srcdir)/emulparams/avrmega103.sh \
413  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
414  ${GEN_DEPENDS}
415	${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)"
416eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
417  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
418  ${GEN_DEPENDS}
419	${GENSCRIPTS} avrmega161 "$(tdir_avr85xx)"
420ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
421  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
422	${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
423ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \
424  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS}
425	${GENSCRIPTS} crisaout "$(tdir_cris)"
426ecriself.c: $(srcdir)/emulparams/criself.sh \
427  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
428	${GENSCRIPTS} criself "$(tdir_cris)"
429ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
430  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
431	${GENSCRIPTS} crislinux "$(tdir_cris)"
432ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
433  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
434	${GENSCRIPTS} d10velf "$(tdir_d10v)"
435ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
436  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
437	${GENSCRIPTS} d30velf "$(tdir_d30v)"
438ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
439  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
440	${GENSCRIPTS} d30v_o "$(tdir_d30v)"
441ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
442  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
443	${GENSCRIPTS} d30v_e "$(tdir_d30v)"
444edelta68.c: $(srcdir)/emulparams/delta68.sh \
445  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
446	${GENSCRIPTS} delta68 "$(tdir_delta68)"
447eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
448  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
449	${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
450eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
451  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
452  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
453	${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
454eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
455  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
456	${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
457eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
458  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
459	${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
460em32relf.c: $(srcdir)/emulparams/m32relf.sh \
461  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
462	${GENSCRIPTS} m32relf "$(tdir_m32r)"
463eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
464  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
465	${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
466eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
467  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
468	${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
469eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
470  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
471	${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
472eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
473  $(srcdir)/emulparams/elf32bmip.sh \
474  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
475	${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
476eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
477  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
478	${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
479eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
480  $(srcdir)/emulparams/elf32bmip.sh \
481  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
482	${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
483eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
484  $(srcdir)/emulparams/elf32bmip.sh \
485  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
486	${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
487eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
488  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
489  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
490	${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
491eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
492  $(srcdir)/emulparams/elf32bmip.sh \
493  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
494	${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
495eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
496  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
497  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
498	${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
499eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
500  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
501	${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
502eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
503  $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
504  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
505	${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
506eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
507  $(srcdir)/emulparams/elf32bmip.sh \
508  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
509	${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
510eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
511  $(srcdir)/emulparams/elf32ppc.sh \
512  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
513	${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
514eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
515  $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
516  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
517	${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
518eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
519  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
520  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
521	${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
522eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
523  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
524	${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
525eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
526  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
527	${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
528eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
529  $(srcdir)/emulparams/elf32ppc.sh \
530  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
531	${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
532eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
533  $(srcdir)/emulparams/elf32ppc.sh \
534  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
535	${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
536eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
537  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
538	${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
539eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
540  $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
541  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
542	${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
543eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
544  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
545	${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
546eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
547  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
548	${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
549eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
550  $(srcdir)/emulparams/elf64alpha.sh \
551  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
552	${GENSCRIPTS} elf64alpha_nbsd "$(tdir_elf64alpha_nbsd)"
553eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
554  $(srcdir)/emulparams/hppa64linux.sh \
555  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
556	${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
557eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
558  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
559	${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
560eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
561  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
562  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
563	${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
564eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
565  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
566	${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
567eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
568  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
569	${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
570eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
571  $(srcdir)/emulparams/elf32bmipn32.sh \
572  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
573	${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
574eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
575  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/mmix-elfnmmo.em \
576  $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
577	${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)"
578emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
579  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mmo.em \
580  $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
581	${GENSCRIPTS} mmo "$(tdir_mmo)"
582eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
583  $(srcdir)/emulparams/elf32bmipn32.sh \
584  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
585	${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
586eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
587  $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf32bmipn32.sh \
588  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
589	${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
590eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
591  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
592	${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
593eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
594  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
595	${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
596eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
597  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
598	${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
599eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
600  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
601	${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
602eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
603  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
604	${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
605eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
606  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
607	${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
608egld960.c: $(srcdir)/emulparams/gld960.sh \
609  $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
610	${GENSCRIPTS} gld960 "$(tdir_gld960)"
611egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
612  $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
613	${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
614eh8300.c: $(srcdir)/emulparams/h8300.sh \
615  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
616	${GENSCRIPTS} h8300 "$(tdir_h8300)"
617eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
618  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
619	${GENSCRIPTS} h8300h "$(tdir_h8300h)"
620eh8300s.c: $(srcdir)/emulparams/h8300s.sh \
621  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
622	${GENSCRIPTS} h8300s "$(tdir_h8300s)"
623eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
624  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
625	${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
626eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
627  $(srcdir)/emulparams/h8300elf.sh \
628  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
629	${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
630eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
631  $(srcdir)/emulparams/h8300elf.sh \
632  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
633	${GENSCRIPTS} h8300self "$(tdir_h8300self)"
634eh8500.c: $(srcdir)/emulparams/h8500.sh \
635  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
636	${GENSCRIPTS} h8500 "$(tdir_h8500)"
637eh8500b.c: $(srcdir)/emulparams/h8500b.sh \
638  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
639	${GENSCRIPTS} h8500b "$(tdir_h8500b)"
640eh8500c.c: $(srcdir)/emulparams/h8500c.sh \
641  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
642	${GENSCRIPTS} h8500c "$(tdir_h8500c)"
643eh8500m.c: $(srcdir)/emulparams/h8500m.sh \
644  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
645	${GENSCRIPTS} h8500m "$(tdir_h8500m)"
646eh8500s.c: $(srcdir)/emulparams/h8500s.sh \
647  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
648	${GENSCRIPTS} h8500s "$(tdir_h8500s)"
649ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
650  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
651	${GENSCRIPTS} hp300bsd "$(tdir_hp300bsd)"
652ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
653  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
654	${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
655ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
656  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
657  $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
658	${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
659ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
660  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
661  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
662	${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
663ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
664  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
665	${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
666ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
667  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
668	${GENSCRIPTS} i386aout "$(tdir_i386aout)"
669ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
670  $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
671	${GENSCRIPTS} i386beos "$(tdir_i386beos)"
672ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
673  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
674	${GENSCRIPTS} i386bsd "$(tdir_i386bsd)"
675ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
676  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
677	${GENSCRIPTS} i386coff "$(tdir_i386coff)"
678ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
679  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
680	${GENSCRIPTS} i386go32 "$(tdir_i386go32)"
681ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
682  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
683	${GENSCRIPTS} i386linux "$(tdir_i386linux)"
684ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
685  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
686	${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
687ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
688  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
689	${GENSCRIPTS} i386mach "$(tdir_i386mach)"
690ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
691  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
692	${GENSCRIPTS} i386moss "$(tdir_i386moss)"
693ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
694  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
695	${GENSCRIPTS} i386msdos "$(tdir_i386msdos)"
696ei386nbsd.c:	$(srcdir)/emulparams/i386nbsd.sh \
697  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
698	${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
699ei386nw.c:	$(srcdir)/emulparams/i386nw.sh \
700  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
701	${GENSCRIPTS} i386nw "$(tdir_i386nw)"
702ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
703  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
704	${GENSCRIPTS} i386pe "$(tdir_i386pe)"
705ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
706  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
707	${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
708elnk960.c: $(srcdir)/emulparams/lnk960.sh \
709  $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
710	${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
711em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
712  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
713	${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
714em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
715  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
716	${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
717em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
718  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
719	${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
720em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
721  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
722	${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
723em68k4knbsd.c:	$(srcdir)/emulparams/m68k4knbsd.sh \
724  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
725	${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)"
726em68kaout.c: $(srcdir)/emulparams/m68kaout.sh \
727  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
728	${GENSCRIPTS} m68kaout "$(tdir_m68kaout)"
729em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \
730  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS}
731	${GENSCRIPTS} m68kaux "$(tdir_m68kaux)"
732em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
733  $(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
734	${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
735em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
736  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
737  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
738	${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
739em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
740  $(srcdir)/emulparams/m68kelf.sh \
741  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
742  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
743	${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
744em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
745  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
746	${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
747em68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
748  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68klynx.sc ${GEN_DEPENDS}
749	${GENSCRIPTS} m68klynx "$(tdir_m68klynx)"
750em68knbsd.c:	$(srcdir)/emulparams/m68knbsd.sh \
751  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
752	${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
753em68kpsos.c:	$(srcdir)/emulparams/m68kpsos.sh \
754  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
755	${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
756em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
757  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
758	${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
759emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
760  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
761	${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
762emipsbig.c:  $(srcdir)/emulparams/mipsbig.sh \
763  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
764	${GENSCRIPTS} mipsbig
765emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \
766  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
767	${GENSCRIPTS} mipsbsd
768emipsidt.c: $(srcdir)/emulparams/mipsidt.sh \
769  $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
770	${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
771emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
772  $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
773	${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
774emipslit.c:  $(srcdir)/emulparams/mipslit.sh \
775  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
776	${GENSCRIPTS} mipslit "$(tdir_mipslit)"
777emipslnews.c:  $(srcdir)/emulparams/mipslnews.sh \
778  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
779	${GENSCRIPTS} mipslnews
780emipspe.c: $(srcdir)/emulparams/mipspe.sh \
781  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
782	${GENSCRIPTS} mipspe "$(tdir_mips)"
783emn10300.c: $(srcdir)/emulparams/mn10300.sh \
784  $(srcdir)/emulparams/mn10200.sh \
785  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
786	${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
787emn10200.c: $(srcdir)/emulparams/mn10200.sh \
788  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
789	${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
790enews.c: $(srcdir)/emulparams/news.sh \
791  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
792	${GENSCRIPTS} news "$(tdir_news)"
793ens32knbsd.c:	$(srcdir)/emulparams/ns32knbsd.sh \
794  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
795	${GENSCRIPTS} ns32knbsd "$(tdir_ns32knbsd)"
796epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
797  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
798	${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
799epdp11.c: $(srcdir)/emulparams/pdp11.sh \
800  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
801	${GENSCRIPTS} pdp11 "$(tdir_pdp11)"
802epjelf.c: $(srcdir)/emulparams/pjelf.sh \
803  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
804	${GENSCRIPTS} pjelf "$(tdir_pjelf)"
805epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
806  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
807	${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
808eppcmacos.c:	$(srcdir)/emulparams/ppcmacos.sh \
809  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
810	${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
811eppcnw.c:	$(srcdir)/emulparams/ppcnw.sh \
812  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
813	${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
814eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
815  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
816	${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
817eriscix.c: $(srcdir)/emulparams/riscix.sh \
818  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
819	${GENSCRIPTS} riscix "$(tdir_riscix)"
820esa29200.c: $(srcdir)/emulparams/sa29200.sh \
821  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
822	${GENSCRIPTS} sa29200 "$(tdir_sa29200)"
823esh.c: $(srcdir)/emulparams/sh.sh \
824  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
825	${GENSCRIPTS} sh "$(tdir_sh)"
826eshelf.c: $(srcdir)/emulparams/shelf.sh \
827  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
828	${GENSCRIPTS} shelf "$(tdir_shelf)"
829eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
830  $(srcdir)/emulparams/shlelf_linux.sh \
831  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
832	${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
833eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
834  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
835	${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
836eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
837  $(srcdir)/emulparams/shelf.sh \
838  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
839	${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
840eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
841  $(srcdir)/emulparams/shelf_nbsd.sh \
842  $(srcdir)/emulparams/shelf.sh \
843  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
844	${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
845eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
846  $(srcdir)/emulparams/shelf.sh \
847  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
848	${GENSCRIPTS} shlelf "$(tdir_shlelf)"
849eshl.c: $(srcdir)/emulparams/shl.sh \
850  $(srcdir)/emulparams/sh.sh \
851  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
852	${GENSCRIPTS} shl "$(tdir_shl)"
853eshpe.c: $(srcdir)/emulparams/shpe.sh \
854  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
855	${GENSCRIPTS} shpe "$(tdir_shl)"
856esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
857  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
858	${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
859esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
860  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
861	${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
862esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
863  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
864	${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
865esparcnbsd.c:	$(srcdir)/emulparams/sparcnbsd.sh \
866  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
867	${GENSCRIPTS} sparcnbsd "$(tdir_sparcnbsd)"
868est2000.c: $(srcdir)/emulparams/st2000.sh \
869  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS}
870	${GENSCRIPTS} st2000 "$(tdir_st2000)"
871esun3.c: $(srcdir)/emulparams/sun3.sh \
872  $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
873	${GENSCRIPTS} sun3 "$(tdir_sun3)"
874esun4.c: $(srcdir)/emulparams/sun4.sh \
875  $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
876	${GENSCRIPTS} sun4 "$(tdir_sun4)"
877etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
878  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
879	${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
880etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
881  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
882	${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
883etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \
884  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS}
885	${GENSCRIPTS} tic54xcoff "$(tdir_tic54xcoff)"
886etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
887  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
888	${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
889evanilla.c: $(srcdir)/emulparams/vanilla.sh \
890  $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
891	${GENSCRIPTS} vanilla "$(tdir_vanilla)"
892evax.c: $(srcdir)/emulparams/vax.sh \
893  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
894	${GENSCRIPTS} vax "$(tdir_vax)"
895evsta.c: $(srcdir)/emulparams/vsta.sh \
896  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
897	${GENSCRIPTS} vsta "$(tdir_vsta)"
898ev850.c: $(srcdir)/emulparams/v850.sh \
899  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
900	${GENSCRIPTS} v850 "$(tdir_v850)"
901ew65.c: $(srcdir)/emulparams/w65.sh \
902  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
903	${GENSCRIPTS} w65 "$(tdir_w65)"
904ez8001.c: $(srcdir)/emulparams/z8001.sh \
905  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
906	${GENSCRIPTS} z8001 "$(tdir_z8001)"
907ez8002.c: $(srcdir)/emulparams/z8002.sh \
908  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
909	${GENSCRIPTS} z8002 "$(tdir_z8002)"
910
911# We need this for automake to use YLWRAP.
912EXTRA_ld_new_SOURCES = deffilep.y
913
914ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
915	ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
916ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
917ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
918
919# The generated emulation files mostly have the same dependencies.
920$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
921  ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
922  ldctor.h ldexp.h ldlang.h ldgram.h
923
924# This is the real libbfd.a created by libtool.
925TESTBFDLIB = @TESTBFDLIB@
926
927check-DEJAGNU: site.exp
928	srcroot=`cd $(srcdir) && pwd`; export srcroot; \
929	r=`pwd`; export r; \
930	LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
931	EXPECT=$(EXPECT); export EXPECT; \
932	if [ -f $(top_builddir)/../expect/expect ]; then \
933	  TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
934	  export TCL_LIBRARY; \
935	fi; \
936	runtest=$(RUNTEST); \
937	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
938	  $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
939		CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
940		CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
941		CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
942		OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
943		LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
944		$(RUNTESTFLAGS); \
945	else echo "WARNING: could not find \`runtest'" 1>&2; :;\
946	fi
947
948# Rules for testing by relinking ld itself.
949# A similar test is in the testsuite.  This target is for ease of use
950# when porting ld.
951
952ld-partial.o: ld-new$(EXEEXT)
953	./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
954ld1$(EXEEXT): ld-partial.o
955	./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
956
957ld1-full$(EXEEXT): ld-new
958	./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
959
960ld2$(EXEEXT): ld1$(EXEEXT)
961	./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
962
963ld3$(EXEEXT): ld2$(EXEEXT)
964	./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
965
966bootstrap: ld3$(EXEEXT)
967	cmp ld2$(EXEEXT) ld3$(EXEEXT)
968
969.PHONY: bootstrap
970
971# A test program for C++ constructors and destructors.
972# This test is now in the testsuite.
973#
974#cdtest: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
975#	./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
976#	  cdtest-main.o cdtest-bar.o cdtest-foo.o $(HOSTING_LIBS)
977#
978#cdtest.out: cdtest
979#	./cdtest > cdtest.tmp
980#	mv cdtest.tmp cdtest.out
981#
982#cdtest-ur.o: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
983#	./ld.new $(HOSTING_EMU) -o cdtest-ur.o -Ur cdtest-main.o \
984#	  cdtest-bar.o cdtest-foo.o
985#
986#cdtest-ur: cdtest-ur.o
987#	./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.o \
988#	  $(HOSTING_LIBS)
989#
990#cdtest-ur.out: cdtest-ur
991#	./cdtest-ur > cdtest-ur.tmp
992#	mv cdtest-ur.tmp cdtest-ur.out
993#
994#check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
995#	diff $(srcdir)/cdtest.exp cdtest.out
996#	diff $(srcdir)/cdtest.exp cdtest-ur.out
997#
998#.PHONY: check-cdtest
999
1000# END OF CHECK TARGETS
1001
1002# DOCUMENTATION TARGETS
1003# Manual configuration file; not usually attached to normal configuration,
1004# because almost all configs use "gen" version of manual.
1005#  Set DOCVER above to change.
1006configdoc.texi:	${DOCVER}-doc.texi
1007	ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
1008	  || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
1009	  || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
1010
1011ldver.texi: Makefile
1012	rm -f $@
1013	echo '@set VERSION $(VERSION)' > $@
1014
1015ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
1016	@rm -f $@ $@-[0-9] $@-[0-9][0-9]
1017	$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
1018
1019ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
1020	TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
1021	  MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
1022
1023# Build the man page from the texinfo file
1024# The sed command removes the no-adjust Nroff command so that
1025# the man output looks standard.
1026ld.1: $(srcdir)/ld.texinfo
1027	touch $@
1028	-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
1029	-($(POD2MAN) ld.pod | \
1030	        sed -e '/^.if n .na/d' > $@.T$$$$ && \
1031	        mv -f $@.T$$$$ $@) || \
1032	        (rm -f $@.T$$$$ && exit 1)
1033	rm -f ld.pod
1034
1035MAINTAINERCLEANFILES = ldver.texi
1036
1037# We want to reconfigure if configure.host or configure.tgt changes.
1038CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
1039
1040MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
1041	ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
1042mostlyclean-local:
1043	-rm -rf tmpdir
1044CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
1045
1046.PHONY: install-exec-local install-data-local
1047
1048install-exec-local: ld-new$(EXEEXT)
1049	$(mkinstalldirs) $(bindir) $(tooldir)/bin
1050	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
1051	  if test -f $$p; then \
1052	    echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
1053	    $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
1054	  else :; fi; \
1055	done
1056	n=`echo ld | sed '$(transform)'`; \
1057	if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
1058	  rm -f $(tooldir)/bin/ld$(EXEEXT); \
1059	  ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
1060	  || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
1061	fi
1062
1063install-data-local:
1064	$(mkinstalldirs) $(scriptdir)/ldscripts
1065	for f in ldscripts/*; do \
1066	  $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
1067	done
1068
1069# Stuff that should be included in a distribution.  The diststuff
1070# target is run by the taz target in ../Makefile.in.
1071EXTRA_DIST = ldgram.c ldgram.h ldlex.c $(man_MANS)
1072diststuff: info $(EXTRA_DIST)
1073
1074DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
1075distclean-local:
1076	rm -rf ldscripts
1077
1078Makefile: $(BFDDIR)/configure.in
1079
1080# Targets to rebuild dependencies in this Makefile.
1081# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
1082DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
1083	rm -f DEP1
1084	$(MAKE) MKDEP="$(MKDEP)" DEP1
1085	sed -f dep.sed < DEP1 > DEPA
1086	echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
1087	if grep ' /' DEPA > /dev/null 2> /dev/null; then \
1088	  echo 'make DEP failed!'; exit 1; \
1089	else \
1090	  mv -f DEPA $@; \
1091	fi
1092
1093DEP1: $(CFILES) $(GENERATED_CFILES)
1094	echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
1095	echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
1096	$(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
1097	mv -f DEP2 $@
1098
1099dep.sed: dep-in.sed config.status
1100	sed <$(srcdir)/dep-in.sed >dep.sed	\
1101		-e 's!@INCDIR@!$(INCDIR)!'	\
1102		-e 's!@SRCDIR@!$(srcdir)!'
1103
1104dep: DEP
1105	sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
1106	cat DEP >> tmp-Makefile
1107	$(srcdir)/../move-if-change tmp-Makefile Makefile
1108
1109dep-in: DEP
1110	sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
1111	cat DEP >> tmp-Makefile.in
1112	$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
1113
1114dep-am: DEP
1115	sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
1116	cat DEP >> tmp-Makefile.am
1117	$(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
1118
1119.PHONY: dep dep-in dep-am
1120
1121# What appears below is generated by a hacked mkdep using gcc -MM.
1122
1123# DO NOT DELETE THIS LINE -- mkdep uses it.
1124# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
1125ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1126  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1127  $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
1128  ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
1129ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1130  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1131  ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
1132  ldfile.h ldemul.h ldmain.h ldemul-list.h
1133ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1134  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1135  $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
1136  ldmisc.h ldexp.h ldgram.h ldlang.h $(INCDIR)/libiberty.h
1137ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1138  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1139  $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
1140  ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
1141  ldlex.h ldemul.h $(INCDIR)/libiberty.h
1142ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1143  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1144  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
1145  $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
1146  ldgram.h ldexp.h ldlang.h ldlex.h ldmisc.h ldctor.h \
1147  ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
1148ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1149  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1150  $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
1151  $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h ld.h $(INCDIR)/bin-bugs.h \
1152  ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
1153  ldlex.h ldfile.h ldemul.h ldctor.h
1154ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1155  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1156  $(INCDIR)/libiberty.h $(INCDIR)/demangle.h ld.h $(INCDIR)/bin-bugs.h \
1157  ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h \
1158  ldfile.h
1159ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1160  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1161  ld.h $(INCDIR)/bin-bugs.h ldver.h ldexp.h ldlang.h \
1162  ldfile.h ldemul.h ldmain.h
1163ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1164  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1165  $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h \
1166  ldexp.h ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h
1167lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1168  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1169  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
1170  ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
1171  ldlang.h ldgram.h ldlex.h ldfile.h ldver.h ldemul.h \
1172  $(INCDIR)/demangle.h
1173mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
1174  sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
1175  ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
1176ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1177  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1178  $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h \
1179  ldmain.h ldmisc.h ldexp.h ldlang.h
1180pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1181  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1182  $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
1183  ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
1184  ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
1185  ../bfd/libcoff.h deffile.h pe-dll.h
1186ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1187  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1188  $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
1189  ldver.h ldlang.h ldfile.h ldemul.h ldmisc.h ldmain.h \
1190  mri.h ldctor.h ldlex.h
1191ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/symcat.h sysdep.h \
1192  config.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \
1193  ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \
1194  ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h
1195deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
1196  $(INCDIR)/safe-ctype.h ../bfd/bfd.h $(INCDIR)/symcat.h \
1197  sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
1198  ldmisc.h deffile.h
1199# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
1200