xref: /openbsd/gnu/usr.bin/binutils/ld/Makefile.am (revision 76d0caae)
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.  This can be set
34# when the linker is configured via the --with-lib-path configure switch.
35LIB_PATH = @LIB_PATH@
36
37BASEDIR = $(srcdir)/..
38BFDDIR = $(BASEDIR)/bfd
39INCDIR	= $(BASEDIR)/include
40MKDEP = gcc -MM
41
42# What version of the manual to build
43DOCVER = gen
44
45# Options to extract the man page from ld.texinfo
46MANCONF = -Dman
47
48TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
49
50POD2MAN = pod2man --center="GNU Development Tools" \
51	--release="binutils-$(VERSION)" --section=1
52
53#stuff for self hosting (can be overridden in config file).
54HOSTING_CRT0 = @HOSTING_CRT0@
55HOSTING_LIBS = @HOSTING_LIBS@
56HOSTING_EMU = -m $(EMUL)
57
58# Setup the testing framework, if you have one
59EXPECT = `if [ -f $$r/../expect/expect ] ; \
60	then echo $$r/../expect/expect ; \
61	else echo expect ; fi`
62
63RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
64	then echo $${srcroot}/../dejagnu/runtest ; \
65	else echo runtest ; fi`
66
67RUNTESTFLAGS =
68
69CC_FOR_TARGET = ` \
70  if [ -f $$r/../gcc/xgcc ] ; then \
71    if [ -f $$r/../newlib/Makefile ] ; then \
72      echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
73    else \
74      echo $$r/../gcc/xgcc -B$$r/../gcc/; \
75    fi; \
76  else \
77    if [ "@host@" = "@target@" ] ; then \
78      echo $(CC); \
79    else \
80      echo gcc | sed '$(transform)'; \
81    fi; \
82  fi`
83
84CXX = gcc
85CXX_FOR_TARGET = ` \
86  if [ -f $$r/../gcc/xgcc ] ; then \
87    if [ -f $$r/../newlib/Makefile ] ; then \
88      echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
89    else \
90      echo $$r/../gcc/xgcc -B$$r/../gcc/; \
91    fi; \
92  else \
93    if [ "@host@" = "@target@" ] ; then \
94      echo $(CXX); \
95    else \
96      echo gcc | sed '$(transform)'; \
97    fi; \
98  fi`
99
100noinst_PROGRAMS = ld-new
101info_TEXINFOS = ld.texinfo
102noinst_TEXINFOS = ldint.texinfo
103man_MANS = ld.1
104
105INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
106
107BFDLIB = ../bfd/libbfd.la
108LIBIBERTY = -libiberty
109
110ALL_EMULATIONS = \
111	ea29k.o \
112	eaixppc.o \
113	eaixrs6.o \
114	ealpha.o \
115	earcelf.o \
116	earm_epoc_pe.o \
117	earmaoutb.o \
118	earmaoutl.o \
119	earmcoff.o \
120	earmelf.o \
121	earmelfb.o \
122	earmelf_fbsd.o \
123	earmelf_linux.o \
124	earmelfb_linux.o \
125	earmelf_nbsd.o \
126	earmelfb_nbsd.o \
127	earmelf_obsd.o \
128	earmelfb_obsd.o \
129	earmelf_oabi.o \
130	earmnto.o \
131	earmnbsd.o \
132	earmpe.o \
133	eavr2.o \
134	eavr1.o \
135	eavr3.o \
136	eavr4.o \
137	eavr5.o \
138	ecoff_i860.o \
139	ecoff_sparc.o \
140	ecrisaout.o \
141	ecriself.o \
142	ecrislinux.o \
143	ed10velf.o \
144	ed30v_e.o \
145	ed30v_o.o \
146	ed30velf.o \
147	edelta68.o \
148	eelf32_dlx.o \
149	eebmon29k.o \
150	eelf32_i960.o \
151	eelf32_i860.o \
152	eelf32_sparc.o \
153	eelf32_sparc_obsd.o \
154	eelf32b4300.o \
155	eelf32bmip.o \
156	eelf32bmipn32.o \
157	eelf32btsmip.o \
158	eelf32btsmipn32.o \
159	eelf32ltsmip.o \
160	eelf32ltsmipn32.o \
161	eelf32ebmip.o \
162	eelf32elmip.o \
163	eelf32fr30.o \
164	eelf32frv.o \
165	eelf32i370.o \
166	eelf32ip2k.o \
167	eelf32iq2000.o \
168	eelf32iq10.o \
169	eelf32l4300.o \
170	eelf32lmip.o \
171	eelf32lppc.o \
172	eelf32lppcnto.o \
173	eelf32lppcsim.o \
174	eelf32m88k.o \
175	eelf32m88k_obsd.o \
176	eelf32mcore.o \
177	eelf32mipswindiss.o \
178	eelf32openrisc.o \
179	eelf32ppc.o \
180	eelf32ppc_fbsd.o \
181	eelf32ppc_obsd.o \
182	eelf32ppclinux.o \
183	eelf32ppcnto.o \
184	eelf32ppcsim.o \
185	eelf32ppcwindiss.o \
186	eelf32vax.o \
187	eelf32vax_obsd.o \
188	eelf32xstormy16.o \
189	eelf32xtensa.o \
190	eelf_i386.o \
191	eelf_i386_be.o \
192	eelf_i386_chaos.o \
193	eelf_i386_fbsd.o \
194	eelf_i386_obsd.o \
195	eelf_i386_ldso.o \
196	eelf_s390.o \
197	egld960.o \
198	egld960coff.o \
199	eh8300.o \
200	eh8300h.o \
201	eh8300s.o \
202	eh8300elf.o \
203	eh8300hn.o \
204	eh8300sn.o \
205	eh8300sx.o \
206	eh8300helf.o \
207	eh8300self.o \
208	eh8300hnelf.o \
209	eh8300snelf.o \
210	eh8300sxelf.o \
211	eh8300sxn.o \
212	eh8300sxnelf.o \
213	eh8500.o \
214	eh8500b.o \
215	eh8500c.o \
216	eh8500m.o \
217	eh8500s.o \
218	ehp300bsd.o \
219	ehp3hpux.o \
220	ehppaelf.o \
221	ehppalinux.o \
222	ehppanbsd.o \
223	ehppaobsd.o \
224	ei386aout.o \
225	ei386beos.o \
226	ei386bsd.o \
227	ei386coff.o \
228	ei386go32.o \
229	ei386linux.o \
230	ei386lynx.o \
231	ei386mach.o \
232	ei386moss.o \
233	ei386msdos.o \
234	ei386nbsd.o \
235	ei386nto.o \
236	ei386nw.o \
237	ei386obsd.o \
238	ei386pe.o \
239	ei386pe_posix.o \
240	elnk960.o \
241	em32relf.o \
242	em32rlelf.o \
243	em32relf_linux.o \
244	em32rlelf_linux.o \
245	em68hc11elf.o \
246	em68hc11elfb.o \
247	em68hc12elf.o \
248	em68hc12elfb.o \
249	em68k4knbsd.o \
250	em68kaout.o \
251	em68kaux.o \
252	em68kcoff.o \
253	em68kelf.o \
254	em68kelfnbsd.o \
255	em68kelfobsd.o \
256	em68klinux.o \
257	em68klynx.o \
258	em68knbsd.o \
259	em68kobsd.o \
260	em68kpsos.o \
261	em88kbcs.o \
262	em88kopenbsd.o \
263	emcorepe.o \
264	emipsbig.o \
265	emipsbsd.o \
266	emipsidt.o \
267	emipsidtl.o \
268	emipslit.o \
269	emipslnews.o \
270	emipspe.o \
271	emsp430x110.o \
272	emsp430x112.o \
273	emsp430x1101.o \
274	emsp430x1111.o \
275	emsp430x1121.o \
276	emsp430x1122.o \
277	emsp430x1132.o \
278	emsp430x122.o \
279	emsp430x123.o \
280	emsp430x1222.o \
281	emsp430x1232.o \
282	emsp430x133.o \
283	emsp430x135.o \
284	emsp430x1331.o \
285	emsp430x1351.o \
286	emsp430x147.o \
287	emsp430x148.o \
288	emsp430x149.o \
289	emsp430x155.o \
290	emsp430x156.o \
291	emsp430x157.o \
292	emsp430x167.o \
293	emsp430x168.o \
294	emsp430x169.o \
295	emsp430x311.o \
296	emsp430x312.o \
297	emsp430x313.o \
298	emsp430x314.o \
299	emsp430x315.o \
300	emsp430x323.o \
301	emsp430x325.o \
302	emsp430x336.o \
303	emsp430x337.o \
304	emsp430x412.o \
305	emsp430x413.o \
306	emsp430xE423.o \
307	emsp430xE425.o \
308	emsp430xE427.o \
309	emsp430xW423.o \
310	emsp430xW425.o \
311	emsp430xW427.o \
312	emsp430x435.o \
313	emsp430x436.o \
314	emsp430x437.o \
315	emsp430x447.o \
316	emsp430x448.o \
317	emsp430x449.o \
318	enews.o \
319	ens32knbsd.o \
320	eor32.o \
321	eor32elf.o \
322	epc532macha.o \
323	epdp11.o \
324	epjelf.o \
325	epjlelf.o \
326	eppcmacos.o \
327	eppcnw.o \
328	eppcpe.o \
329	eriscix.o \
330	esa29200.o \
331	esh.o \
332	eshelf32.o \
333	eshlelf32.o \
334	eshelf32_linux.o \
335	eshlelf32_linux.o \
336	eshelf32_nbsd.o \
337	eshlelf32_nbsd.o \
338	eshelf.o \
339	eshelf_linux.o \
340	eshlelf_linux.o \
341	eshelf_nbsd.o \
342	eshlelf_nbsd.o \
343	eshelf_nto.o \
344	eshlelf_nto.o \
345	eshelf_obsd.o \
346	eshlelf_obsd.o \
347	eshl.o \
348	eshlelf.o \
349	eshpe.o \
350	esparcaout.o \
351	esparclinux.o \
352	esparclynx.o \
353	esparcnbsd.o \
354	esparcobsd.o \
355	est2000.o \
356	esun3.o \
357	esun4.o \
358	etic30aout.o \
359	etic30coff.o \
360	etic3xcoff.o \
361	etic3xcoff_onchip.o \
362	etic4xcoff.o \
363	etic54xcoff.o \
364	etic80coff.o \
365	evanilla.o \
366	evax.o \
367	evaxnbsd.o \
368	evsta.o \
369	ew65.o \
370	ez8001.o \
371	  eelf32frvfd.o \
372	ez8002.o
373
374ALL_64_EMULATIONS = \
375	eelf64_aix.o \
376	eelf64_ia64.o \
377	eelf64_ia64_fbsd.o \
378	eshelf64.o \
379	eshlelf64.o \
380	eshelf64_nbsd.o \
381	eshlelf64_nbsd.o \
382	eelf_x86_64.o \
383	eelf_x86_64_fbsd.o \
384	eelf_x86_64_obsd.o \
385	eelf64_s390.o \
386	eelf64_sparc.o \
387	eelf64_sparc_fbsd.o \
388	eelf64_sparc_obsd.o \
389	eelf64alpha.o \
390	eelf64alpha_fbsd.o \
391	eelf64alpha_nbsd.o \
392	eelf64alpha_obsd.o \
393	eelf64bmip.o \
394	eelf64btsmip.o \
395	eelf64btsmip_obsd.o \
396	eelf64ltsmip.o \
397	eelf64ltsmip_obsd.o \
398	eelf64hppa.o \
399	eelf64mmix.o \
400	emmo.o \
401	eelf64ppc.o \
402	eelf64lppc.o \
403	ehppa64linux.o
404
405ALL_EMUL_EXTRA_OFILES = \
406	deffilep.o \
407	pe-dll.o
408
409CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
410	ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
411	mri.c ldcref.c pe-dll.c
412
413HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
414	ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
415	ldwrite.h mri.h deffile.h pe-dll.h
416
417GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
418GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
419
420OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
421	ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o \
422	ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
423
424STAGESTUFF = *.o ldscripts/* e*.c
425
426# At the moment this is just a list of those emulation template files
427# that contain internationalised strings.
428EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
429
430POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
431
432po/POTFILES.in: @MAINT@ Makefile
433	for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
434	  && mv tmp $(srcdir)/po/POTFILES.in
435
436ldmain.o: ldmain.c config.status
437	$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' \
438	  -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' \
439	  -DTOOLBINDIR='"$(tooldir)/bin"' \
440	  -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
441	  $(srcdir)/ldmain.c
442
443ldemul-list.h: Makefile
444	(echo "/* This file is automatically generated.  DO NOT EDIT! */";\
445	for f in `echo " " ${EMULATION_OFILES} "" \
446	 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
447	    echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
448	done;\
449	echo "";\
450	echo "#define EMULATION_LIST \\";\
451	for f in `echo " " ${EMULATION_OFILES} "" \
452	 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
453	    echo "  &ld_$${f}_emulation, \\"; \
454	done;\
455	echo "  0") >ldemul-tmp.h
456	mv ldemul-tmp.h ldemul-list.h
457
458stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
459	  cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
460
461# These all start with e so 'make clean' can find them.
462
463GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
464GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
465
466@TDIRS@
467
468ea29k.c: $(srcdir)/emulparams/a29k.sh \
469  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
470	${GENSCRIPTS} a29k "$(tdir_a29k)"
471eaix5ppc.c: $(srcdir)/emulparams/aix5ppc.sh \
472  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
473	${GENSCRIPTS} aix5ppc "$(tdir_aixppc)"
474eaix5rs6.c: $(srcdir)/emulparams/aix5rs6.sh \
475  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
476	${GENSCRIPTS} aix5rs6 "$(tdir_aixrs6)"
477eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
478  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
479	${GENSCRIPTS} aixppc "$(tdir_aixppc)"
480eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
481  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
482	${GENSCRIPTS} aixrs6 "$(tdir_aixrs6)"
483ealpha.c: $(srcdir)/emulparams/alpha.sh \
484  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
485	${GENSCRIPTS} alpha "$(tdir_alpha)"
486earcelf.c: $(srcdir)/emulparams/arcelf.sh \
487  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
488	${GENSCRIPTS} arcelf "$(tdir_arcelf)"
489earmelf.c: $(srcdir)/emulparams/armelf.sh \
490  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
491  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
492	${GENSCRIPTS} armelf "$(tdir_armelf)"
493earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
494  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
495  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
496	${GENSCRIPTS} armelfb "$(tdir_armelfb)"
497earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
498  $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
499	${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
500earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
501  $(srcdir)/emulparams/armelf.sh \
502  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
503  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
504	${GENSCRIPTS} armelf_fbsd "$(tdir_armelf_fbsd)"
505earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
506  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
507  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
508	${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
509earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
510  $(srcdir)/emulparams/armelf_linux.sh \
511  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
512  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
513	${GENSCRIPTS} armelfb_linux "$(tdir_armelfb_linux)"
514earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
515  $(srcdir)/emulparams/armelf.sh \
516  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
517  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
518	${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
519earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
520  $(srcdir)/emulparams/armelf_nbsd.sh \
521  $(srcdir)/emulparams/armelf.sh \
522  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
523  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
524	${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
525earmelf_obsd.c: $(srcdir)/emulparams/armelf_obsd.sh \
526  $(srcdir)/emulparams/armelf.sh \
527  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
528  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
529	${GENSCRIPTS} armelf_obsd "$(tdir_armelf_obsd)"
530earmelfb_obsd.c: $(srcdir)/emulparams/armelfb_obsd.sh \
531  $(srcdir)/emulparams/armelf_obsd.sh \
532  $(srcdir)/emulparams/armelf.sh \
533  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
534  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
535	${GENSCRIPTS} armelfb_obsd "$(tdir_armelfb_obsd)"
536earmaoutb.c:	$(srcdir)/emulparams/armaoutb.sh \
537  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
538	${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
539earmaoutl.c:	$(srcdir)/emulparams/armaoutl.sh \
540  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
541	${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
542earmcoff.c:	$(srcdir)/emulparams/armcoff.sh \
543  $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
544	${GENSCRIPTS} armcoff "$(tdir_armcoff)"
545earmnbsd.c:	$(srcdir)/emulparams/armnbsd.sh \
546  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
547	${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
548earmnto.c: $(srcdir)/emulparams/armnto.sh \
549  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
550  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
551	${GENSCRIPTS} armnto "$(tdir_armnto)"
552earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
553  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
554	${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
555earmpe.c: $(srcdir)/emulparams/armpe.sh \
556  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
557	${GENSCRIPTS} armpe "$(tdir_armpe)"
558eavr2.c: $(srcdir)/emulparams/avr2.sh \
559  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
560  ${GEN_DEPENDS}
561	${GENSCRIPTS} avr2 "$(tdir_avr2)"
562eavr1.c: $(srcdir)/emulparams/avr1.sh \
563  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
564  ${GEN_DEPENDS}
565	${GENSCRIPTS} avr1 "$(tdir_avr2)"
566eavr3.c: $(srcdir)/emulparams/avr3.sh \
567  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
568  ${GEN_DEPENDS}
569	${GENSCRIPTS} avr3 "$(tdir_avr2)"
570eavr4.c: $(srcdir)/emulparams/avr4.sh \
571  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
572  ${GEN_DEPENDS}
573	${GENSCRIPTS} avr4 "$(tdir_avr2)"
574eavr5.c: $(srcdir)/emulparams/avr5.sh \
575  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
576  ${GEN_DEPENDS}
577	${GENSCRIPTS} avr5 "$(tdir_avr2)"
578ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
579  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
580	${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
581ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
582  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
583	${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
584ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \
585  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS}
586	${GENSCRIPTS} crisaout "$(tdir_cris)"
587ecriself.c: $(srcdir)/emulparams/criself.sh \
588  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
589	${GENSCRIPTS} criself "$(tdir_cris)"
590ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
591  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
592	${GENSCRIPTS} crislinux "$(tdir_cris)"
593ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
594  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
595	${GENSCRIPTS} d10velf "$(tdir_d10v)"
596ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
597  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
598	${GENSCRIPTS} d30velf "$(tdir_d30v)"
599ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
600  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
601	${GENSCRIPTS} d30v_o "$(tdir_d30v)"
602ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
603  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
604	${GENSCRIPTS} d30v_e "$(tdir_d30v)"
605edelta68.c: $(srcdir)/emulparams/delta68.sh \
606  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
607	${GENSCRIPTS} delta68 "$(tdir_delta68)"
608eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
609  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
610	${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
611eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
612  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
613	${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
614eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
615  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
616  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
617	${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
618eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
619  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
620	${GENSCRIPTS} elf32am33lin "$(tdir_mn10300)"
621eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
622  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
623	${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
624eelf32vax_obsd.c: $(srcdir)/emulparams/elf32vax_obsd.sh \
625  $(srcdir)/emulparams/elf32vax.sh \
626  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
627	${GENSCRIPTS} elf32vax_obsd "$(tdir_elf32vax_obsd)"
628eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh \
629  $(srcdir)/emulparams/xtensa-config.sh \
630  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/xtensaelf.em \
631  $(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
632	${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)"
633eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
634  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
635	${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
636eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
637  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
638	${GENSCRIPTS} elf32frv "$(tdir_frv)"
639eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
640  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
641	${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
642em32relf.c: $(srcdir)/emulparams/m32relf.sh \
643  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
644	${GENSCRIPTS} m32relf "$(tdir_m32r)"
645em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
646  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
647	${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
648em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
649  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
650	${GENSCRIPTS} m32relf_linux "$(tdir_m32relf_linux)"
651em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
652  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
653	${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
654eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
655  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
656	${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
657eelf32_sparc_obsd.c: $(srcdir)/emulparams/elf32_sparc_obsd.sh \
658  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
659	${GENSCRIPTS} elf32_sparc_obsd "$(tdir_elf32_sparc_obsd)"
660eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
661  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
662	${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
663eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
664  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
665	${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
666eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
667  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
668  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
669	${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
670eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
671  $(srcdir)/emultempl/mipself.em \
672  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
673	${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
674eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
675  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/irix.em \
676  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
677	${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
678eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
679  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
680  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
681	${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
682eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
683  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
684  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
685	${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
686eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
687  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
688  $(srcdir)/emultempl/mipself.em \
689  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
690	${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
691eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
692  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
693  $(srcdir)/emultempl/mipself.em \
694  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
695	${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
696eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
697  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
698  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
699	${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
700eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
701  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
702  $(srcdir)/emultempl/mipself.em \
703  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
704	${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
705eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
706  $(srcdir)/emultempl/irix.em \
707  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
708	${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
709eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
710  $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
711  $(srcdir)/emultempl/mipself.em \
712  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
713	${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
714eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
715  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
716  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
717	${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
718eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh \
719  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
720	${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
721eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
722  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
723  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
724	${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
725eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
726  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
727  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
728	${GENSCRIPTS} elf32lppcnto "$(tdir_elf32lppcnto)"
729eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
730  $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
731  $(srcdir)/emultempl/ppc32elf.em \
732  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
733	${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
734eelf32m88k.c: $(srcdir)/emulparams/elf32m88k.sh \
735  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
736	${GENSCRIPTS} elf32m88k "$(tdir_elf32m88k)"
737eelf32m88k_obsd.c: $(srcdir)/emulparams/elf32m88k_obsd.sh \
738  $(srcdir)/emulparams/elf32m88k.sh \
739  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
740	${GENSCRIPTS} elf32m88k_obsd "$(tdir_elf32m88k_obsd)"
741eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
742eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
743  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
744  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
745	${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
746eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
747  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
748	${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
749eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
750  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
751  $(srcdir)/emultempl/mipself.em \
752  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
753	${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
754eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
755  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
756	${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
757eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
758  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
759	${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
760eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
761  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
762  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
763	${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
764eelf32ppc_obsd.c: $(srcdir)/emulparams/elf32ppc_obsd.sh \
765  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
766  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
767	${GENSCRIPTS} elf32ppc_obsd "$(tdir_elf32ppc_obsd)"
768eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
769  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
770  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
771	${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
772eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
773  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
774  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
775	${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
776eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
777  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
778	${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
779eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
780  $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
781  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
782	${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
783eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
784  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
785	${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
786eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
787  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
788	${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
789eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
790  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
791	${GENSCRIPTS} elf32iq2000 "$(tdir_iq2000)"
792eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
793  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
794	${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
795eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
796  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
797	${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
798eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
799  $(srcdir)/emulparams/elf64alpha.sh \
800  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
801	${GENSCRIPTS} elf64alpha_fbsd "$(tdir_elf64alpha_fbsd)"
802eelf64alpha_obsd.c: $(srcdir)/emulparams/elf64alpha_obsd.sh \
803  $(srcdir)/emulparams/elf64alpha.sh \
804  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
805	${GENSCRIPTS} elf64alpha_obsd "$(tdir_elf64alpha_obsd)"
806eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
807  $(srcdir)/emulparams/elf64alpha.sh \
808  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
809	${GENSCRIPTS} elf64alpha_nbsd "$(tdir_elf64alpha_nbsd)"
810eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
811  $(srcdir)/emulparams/hppa64linux.sh \
812  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
813	${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
814eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
815  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
816	${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
817eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
818  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/ia64elf.em \
819  $(srcdir)/emultempl/needrelax.em \
820  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
821	${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
822eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
823  $(srcdir)/emulparams/elf64_ia64.sh \
824  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/ia64elf.em \
825  $(srcdir)/emultempl/needrelax.em \
826  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
827	${GENSCRIPTS} elf64_ia64_fbsd "$(tdir_elf64_ia64_fbsd)"
828eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
829  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
830	${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
831eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
832  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
833	${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
834eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
835  $(srcdir)/emulparams/elf64_sparc.sh \
836  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
837	${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
838eelf64_sparc_obsd.c: $(srcdir)/emulparams/elf64_sparc_obsd.sh \
839  $(srcdir)/emulparams/elf64_sparc.sh \
840  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
841	${GENSCRIPTS} elf64_sparc_obsd "$(tdir_elf64_sparc_obsd)"
842eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
843  $(srcdir)/emulparams/elf32bmipn32.sh $(srcdir)/emultempl/irix.em \
844  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
845	${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
846eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
847  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/mmix-elfnmmo.em \
848  $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
849	${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)"
850emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
851  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mmo.em \
852  $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
853	${GENSCRIPTS} mmo "$(tdir_mmo)"
854eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
855  $(srcdir)/emulparams/elf32bmipn32.sh \
856  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
857	${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
858eelf64btsmip_obsd.c: $(srcdir)/emulparams/elf64btsmip_obsd.sh \
859  $(srcdir)/emulparams/elf32bmipn32.sh \
860  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
861	${GENSCRIPTS} elf64btsmip_obsd "$(tdir_elf64btsmip_obsd)"
862eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
863  $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf32bmipn32.sh \
864  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
865	${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
866eelf64ltsmip_obsd.c: $(srcdir)/emulparams/elf64ltsmip_obsd.sh \
867  $(srcdir)/emulparams/elf32bmipn32.sh \
868  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
869	${GENSCRIPTS} elf64ltsmip_obsd "$(tdir_elf64ltsmip_obsd)"
870eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
871  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
872	${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
873eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
874  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
875	${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
876eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
877  $(srcdir)/emulparams/elf_x86_64.sh \
878  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
879	${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
880eelf_x86_64_obsd.c: $(srcdir)/emulparams/elf_x86_64_obsd.sh \
881  $(srcdir)/emulparams/elf_x86_64.sh \
882  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
883	${GENSCRIPTS} elf_x86_64_obsd "$(tdir_elf_x86_64_obsd)"
884eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
885  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
886	${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
887eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
888  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
889	${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
890eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
891  $(srcdir)/emulparams/elf_i386.sh \
892  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
893	${GENSCRIPTS} elf_i386_fbsd "$(tdir_elf_i386_fbsd)"
894eelf_i386_obsd.c: $(srcdir)/emulparams/elf_i386_obsd.sh \
895  $(srcdir)/emulparams/elf_i386.sh \
896  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
897	${GENSCRIPTS} elf_i386_obsd "$(tdir_elf_i386_obsd)"
898eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
899  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
900	${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
901eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
902  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
903	${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
904egld960.c: $(srcdir)/emulparams/gld960.sh \
905  $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
906	${GENSCRIPTS} gld960 "$(tdir_gld960)"
907egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
908  $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
909	${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
910eh8300.c: $(srcdir)/emulparams/h8300.sh \
911  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
912	${GENSCRIPTS} h8300 "$(tdir_h8300)"
913eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
914  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
915	${GENSCRIPTS} h8300h "$(tdir_h8300h)"
916eh8300s.c: $(srcdir)/emulparams/h8300s.sh \
917  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
918	${GENSCRIPTS} h8300s "$(tdir_h8300s)"
919eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \
920  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300hn.sc ${GEN_DEPENDS}
921	${GENSCRIPTS} h8300hn "$(tdir_h8300hn)"
922eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \
923  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS}
924	${GENSCRIPTS} h8300sn "$(tdir_h8300sn)"
925eh8300sx.c: $(srcdir)/emulparams/h8300sx.sh \
926  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sx.sc ${GEN_DEPENDS}
927	${GENSCRIPTS} h8300sx "$(tdir_h8300sx)"
928eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \
929  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS}
930	${GENSCRIPTS} h8300sxn "$(tdir_h8300sxn)"
931eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
932  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
933	${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
934eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
935  $(srcdir)/emulparams/h8300elf.sh \
936  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
937	${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
938eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
939  $(srcdir)/emulparams/h8300elf.sh \
940  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
941	${GENSCRIPTS} h8300self "$(tdir_h8300self)"
942eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
943  $(srcdir)/emulparams/h8300elf.sh \
944  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
945	${GENSCRIPTS} h8300hnelf "$(tdir_h8300hnelf)"
946eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
947  $(srcdir)/emulparams/h8300elf.sh \
948  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
949	${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
950eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
951  $(srcdir)/emulparams/h8300elf.sh \
952  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
953	${GENSCRIPTS} h8300sxelf "$(tdir_h8300sxelf)"
954eh8300sxnelf.c: $(srcdir)/emulparams/h8300sxnelf.sh \
955  $(srcdir)/emulparams/h8300elf.sh \
956  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
957	${GENSCRIPTS} h8300sxnelf "$(tdir_h8300sxnelf)"
958eh8500.c: $(srcdir)/emulparams/h8500.sh \
959  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
960	${GENSCRIPTS} h8500 "$(tdir_h8500)"
961eh8500b.c: $(srcdir)/emulparams/h8500b.sh \
962  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
963	${GENSCRIPTS} h8500b "$(tdir_h8500b)"
964eh8500c.c: $(srcdir)/emulparams/h8500c.sh \
965  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
966	${GENSCRIPTS} h8500c "$(tdir_h8500c)"
967eh8500m.c: $(srcdir)/emulparams/h8500m.sh \
968  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
969	${GENSCRIPTS} h8500m "$(tdir_h8500m)"
970eh8500s.c: $(srcdir)/emulparams/h8500s.sh \
971  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
972	${GENSCRIPTS} h8500s "$(tdir_h8500s)"
973ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
974  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
975	${GENSCRIPTS} hp300bsd "$(tdir_hp300bsd)"
976ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
977  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
978	${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
979ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
980  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
981  $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
982	${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
983ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
984  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
985  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
986	${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
987ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
988  $(srcdir)/emulparams/hppaelf.sh \
989  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
990  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
991	${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
992ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
993  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
994  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
995	${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)"
996ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
997  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
998	${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
999ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
1000  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1001	${GENSCRIPTS} i386aout "$(tdir_i386aout)"
1002ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
1003  $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
1004	${GENSCRIPTS} i386beos "$(tdir_i386beos)"
1005ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
1006  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1007	${GENSCRIPTS} i386bsd "$(tdir_i386bsd)"
1008ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
1009  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
1010	${GENSCRIPTS} i386coff "$(tdir_i386coff)"
1011ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
1012  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
1013	${GENSCRIPTS} i386go32 "$(tdir_i386go32)"
1014ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
1015  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1016	${GENSCRIPTS} i386linux "$(tdir_i386linux)"
1017ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
1018  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
1019	${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
1020ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
1021  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1022	${GENSCRIPTS} i386mach "$(tdir_i386mach)"
1023ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
1024  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1025	${GENSCRIPTS} i386moss "$(tdir_i386moss)"
1026ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
1027  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
1028	${GENSCRIPTS} i386msdos "$(tdir_i386msdos)"
1029ei386nbsd.c:	$(srcdir)/emulparams/i386nbsd.sh \
1030  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1031	${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
1032ei386nto.c:	$(srcdir)/emulparams/i386nto.sh \
1033  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1034	${GENSCRIPTS} i386nto "$(tdir_i386nto)"
1035ei386nw.c:	$(srcdir)/emulparams/i386nw.sh \
1036  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
1037	${GENSCRIPTS} i386nw "$(tdir_i386nw)"
1038ei386obsd.c:	$(srcdir)/emulparams/i386obsd.sh \
1039  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1040	${GENSCRIPTS} i386obsd "$(tdir_i386obsd)"
1041ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
1042  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
1043	${GENSCRIPTS} i386pe "$(tdir_i386pe)"
1044ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
1045  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
1046	${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
1047elnk960.c: $(srcdir)/emulparams/lnk960.sh \
1048  $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
1049	${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
1050em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
1051  $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
1052  $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
1053	${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
1054em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
1055  $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
1056  $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
1057	${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
1058em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
1059  $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
1060  $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
1061	${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
1062em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
1063  $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
1064  $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
1065	${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
1066em68k4knbsd.c:	$(srcdir)/emulparams/m68k4knbsd.sh \
1067  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1068	${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)"
1069em68kaout.c: $(srcdir)/emulparams/m68kaout.sh \
1070  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1071	${GENSCRIPTS} m68kaout "$(tdir_m68kaout)"
1072em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \
1073  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS}
1074	${GENSCRIPTS} m68kaux "$(tdir_m68kaux)"
1075em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
1076  $(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
1077	${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
1078em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
1079  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
1080  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1081	${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
1082em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
1083  $(srcdir)/emulparams/m68kelf.sh \
1084  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
1085  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1086	${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
1087em68kelfobsd.c: $(srcdir)/emulparams/m68kelfobsd.sh \
1088  $(srcdir)/emulparams/m68kelf.sh $(srcdir)/emulparams/elf_obsd.sh \
1089  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
1090  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1091	${GENSCRIPTS} m68kelfobsd "$(tdir_m68kelfobsd)"
1092em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
1093  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1094	${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
1095em68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
1096  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68klynx.sc ${GEN_DEPENDS}
1097	${GENSCRIPTS} m68klynx "$(tdir_m68klynx)"
1098em68knbsd.c:	$(srcdir)/emulparams/m68knbsd.sh \
1099  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1100	${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
1101em68kobsd.c:	$(srcdir)/emulparams/m68kobsd.sh \
1102  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1103	${GENSCRIPTS} m68kobsd "$(tdir_m68kobsd)"
1104em68kpsos.c:	$(srcdir)/emulparams/m68kpsos.sh \
1105  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
1106	${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
1107em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
1108  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
1109	${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
1110em88kopenbsd.c: $(srcdir)/emulparams/m88kopenbsd.sh \
1111  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1112	${GENSCRIPTS} m88kopenbsd "$(tdir_m88kopenbsd)"
1113emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
1114  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
1115	${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
1116emipsbig.c:  $(srcdir)/emulparams/mipsbig.sh \
1117  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
1118	${GENSCRIPTS} mipsbig
1119emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \
1120  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
1121	${GENSCRIPTS} mipsbsd
1122emipsidt.c: $(srcdir)/emulparams/mipsidt.sh \
1123  $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
1124	${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
1125emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
1126  $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
1127	${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
1128emipslit.c:  $(srcdir)/emulparams/mipslit.sh \
1129  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
1130	${GENSCRIPTS} mipslit "$(tdir_mipslit)"
1131emipslnews.c:  $(srcdir)/emulparams/mipslnews.sh \
1132  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
1133	${GENSCRIPTS} mipslnews
1134emipspe.c: $(srcdir)/emulparams/mipspe.sh \
1135  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
1136	${GENSCRIPTS} mipspe "$(tdir_mips)"
1137emn10300.c: $(srcdir)/emulparams/mn10300.sh \
1138  $(srcdir)/emulparams/mn10200.sh \
1139  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1140	${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
1141emn10200.c: $(srcdir)/emulparams/mn10200.sh \
1142  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1143	${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
1144emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
1145  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1146  ${GEN_DEPENDS}
1147	${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)" msp430all
1148emsp430x112.c: $(srcdir)/emulparams/msp430all.sh \
1149  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1150  ${GEN_DEPENDS}
1151	${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
1152emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
1153  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1154  ${GEN_DEPENDS}
1155	${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)" msp430all
1156emsp430x1111.c: $(srcdir)/emulparams/msp430all.sh \
1157  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1158  ${GEN_DEPENDS}
1159	${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
1160emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
1161  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1162  ${GEN_DEPENDS}
1163	${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)" msp430all
1164emsp430x1122.c: $(srcdir)/emulparams/msp430all.sh \
1165  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1166  ${GEN_DEPENDS}
1167	${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
1168emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
1169  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1170  ${GEN_DEPENDS}
1171	${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)" msp430all
1172emsp430x122.c: $(srcdir)/emulparams/msp430all.sh \
1173  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1174  ${GEN_DEPENDS}
1175	${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
1176emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
1177  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1178  ${GEN_DEPENDS}
1179	${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)" msp430all
1180emsp430x1222.c: $(srcdir)/emulparams/msp430all.sh \
1181  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1182  ${GEN_DEPENDS}
1183	${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
1184emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
1185  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1186  ${GEN_DEPENDS}
1187	${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)" msp430all
1188emsp430x133.c: $(srcdir)/emulparams/msp430all.sh \
1189  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1190  ${GEN_DEPENDS}
1191	${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
1192emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
1193  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1194  ${GEN_DEPENDS}
1195	${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)" msp430all
1196emsp430x1331.c: $(srcdir)/emulparams/msp430all.sh \
1197  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1198  ${GEN_DEPENDS}
1199	${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
1200emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
1201  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1202  ${GEN_DEPENDS}
1203	${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)" msp430all
1204emsp430x147.c: $(srcdir)/emulparams/msp430all.sh \
1205  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1206  ${GEN_DEPENDS}
1207	${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
1208emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
1209  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1210  ${GEN_DEPENDS}
1211	${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)" msp430all
1212emsp430x149.c: $(srcdir)/emulparams/msp430all.sh \
1213  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1214  ${GEN_DEPENDS}
1215	${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
1216emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
1217  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1218  ${GEN_DEPENDS}
1219	${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)" msp430all
1220emsp430x156.c: $(srcdir)/emulparams/msp430all.sh \
1221  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1222  ${GEN_DEPENDS}
1223	${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
1224emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
1225  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1226  ${GEN_DEPENDS}
1227	${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)" msp430all
1228emsp430x167.c: $(srcdir)/emulparams/msp430all.sh \
1229  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1230  ${GEN_DEPENDS}
1231	${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
1232emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
1233  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1234  ${GEN_DEPENDS}
1235	${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)" msp430all
1236emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
1237  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1238  ${GEN_DEPENDS}
1239	${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
1240emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
1241  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
1242  ${GEN_DEPENDS}
1243	${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)" msp430all
1244emsp430x312.c: $(srcdir)/emulparams/msp430all.sh \
1245  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
1246  ${GEN_DEPENDS}
1247	${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
1248emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
1249  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
1250  ${GEN_DEPENDS}
1251	${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)" msp430all
1252emsp430x314.c: $(srcdir)/emulparams/msp430all.sh \
1253  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
1254  ${GEN_DEPENDS}
1255	${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
1256emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
1257  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
1258  ${GEN_DEPENDS}
1259	${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)" msp430all
1260emsp430x323.c: $(srcdir)/emulparams/msp430all.sh \
1261  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
1262  ${GEN_DEPENDS}
1263	${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
1264emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
1265  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
1266  ${GEN_DEPENDS}
1267	${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)" msp430all
1268emsp430x336.c: $(srcdir)/emulparams/msp430all.sh \
1269  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
1270  ${GEN_DEPENDS}
1271	${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
1272emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
1273  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
1274  ${GEN_DEPENDS}
1275	${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)" msp430all
1276emsp430x412.c: $(srcdir)/emulparams/msp430all.sh \
1277  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1278  ${GEN_DEPENDS}
1279	${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
1280emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
1281  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1282  ${GEN_DEPENDS}
1283	${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
1284emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
1285  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1286  ${GEN_DEPENDS}
1287	${GENSCRIPTS} msp430xE423 "$(tdir_msp430xE423)" msp430all
1288emsp430xE425.c: $(srcdir)/emulparams/msp430all.sh \
1289  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1290  ${GEN_DEPENDS}
1291	${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
1292emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
1293  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1294  ${GEN_DEPENDS}
1295	${GENSCRIPTS} msp430xE427 "$(tdir_msp430xE427)" msp430all
1296emsp430xW423.c: $(srcdir)/emulparams/msp430all.sh \
1297  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1298  ${GEN_DEPENDS}
1299	${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
1300emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
1301  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1302  ${GEN_DEPENDS}
1303	${GENSCRIPTS} msp430xW425 "$(tdir_msp430xW425)" msp430all
1304emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
1305  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1306  ${GEN_DEPENDS}
1307	${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
1308emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
1309  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1310  ${GEN_DEPENDS}
1311	${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)" msp430all
1312emsp430x436.c: $(srcdir)/emulparams/msp430all.sh \
1313  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1314  ${GEN_DEPENDS}
1315	${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
1316emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
1317  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1318  ${GEN_DEPENDS}
1319	${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)" msp430all
1320emsp430x447.c: $(srcdir)/emulparams/msp430all.sh \
1321  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1322  ${GEN_DEPENDS}
1323	${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
1324emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
1325  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1326  ${GEN_DEPENDS}
1327	${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)" msp430all
1328emsp430x449.c: $(srcdir)/emulparams/msp430all.sh \
1329  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
1330  ${GEN_DEPENDS}
1331	${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)" msp430all
1332enews.c: $(srcdir)/emulparams/news.sh \
1333  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1334	${GENSCRIPTS} news "$(tdir_news)"
1335ens32knbsd.c:	$(srcdir)/emulparams/ns32knbsd.sh \
1336  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/netbsd.em \
1337  $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1338	${GENSCRIPTS} ns32knbsd "$(tdir_ns32knbsd)"
1339eor32.c: $(srcdir)/emulparams/or32.sh \
1340  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/or32.sc ${GEN_DEPENDS}
1341	${GENSCRIPTS} or32 "$(tdir_or32)"
1342eor32elf.c: $(srcdir)/emulparams/or32elf.sh \
1343  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1344	${GENSCRIPTS} or32elf "$(tdir_or32elf)"
1345epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
1346  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1347	${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
1348epdp11.c: $(srcdir)/emulparams/pdp11.sh \
1349  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1350	${GENSCRIPTS} pdp11 "$(tdir_pdp11)"
1351epjelf.c: $(srcdir)/emulparams/pjelf.sh \
1352  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1353	${GENSCRIPTS} pjelf "$(tdir_pjelf)"
1354epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
1355  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1356	${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
1357eppcmacos.c:	$(srcdir)/emulparams/ppcmacos.sh \
1358  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
1359	${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
1360eppcnw.c:	$(srcdir)/emulparams/ppcnw.sh \
1361  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
1362	${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
1363eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
1364  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
1365	${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
1366eriscix.c: $(srcdir)/emulparams/riscix.sh \
1367  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1368	${GENSCRIPTS} riscix "$(tdir_riscix)"
1369esa29200.c: $(srcdir)/emulparams/sa29200.sh \
1370  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
1371	${GENSCRIPTS} sa29200 "$(tdir_sa29200)"
1372esh.c: $(srcdir)/emulparams/sh.sh \
1373  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
1374	${GENSCRIPTS} sh "$(tdir_sh)"
1375eshelf.c: $(srcdir)/emulparams/shelf.sh \
1376  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1377	${GENSCRIPTS} shelf "$(tdir_shelf)"
1378eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
1379  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1380  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1381  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1382	${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
1383eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
1384  $(srcdir)/emulparams/shelf32.sh \
1385  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1386  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1387  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1388	${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
1389eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
1390  $(srcdir)/emulparams/shelf32.sh \
1391  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1392  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1393  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1394	${GENSCRIPTS} shelf32_nbsd "$(tdir_shelf32_nbsd)"
1395eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
1396  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1397	${GENSCRIPTS} shelf64 "$(tdir_shelf64)"
1398eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
1399  $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
1400  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1401	${GENSCRIPTS} shelf64_nbsd "$(tdir_shelf64_nbsd)"
1402eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
1403  $(srcdir)/emulparams/shlelf_linux.sh \
1404  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1405	${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
1406eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
1407  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1408	${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
1409eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
1410  $(srcdir)/emulparams/shelf.sh \
1411  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1412	${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
1413eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
1414  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1415	${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
1416eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
1417  $(srcdir)/emulparams/shelf_nbsd.sh \
1418  $(srcdir)/emulparams/shelf.sh \
1419  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1420	${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
1421eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
1422  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1423	${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
1424eshelf_obsd.c: $(srcdir)/emulparams/shelf_obsd.sh \
1425  $(srcdir)/emulparams/shelf.sh \
1426  $(srcdir)/emulparams/elf_obsd.sh \
1427  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1428	${GENSCRIPTS} shelf_obsd "$(tdir_shelf_obsd)"
1429eshlelf_obsd.c: $(srcdir)/emulparams/shlelf_obsd.sh \
1430  $(srcdir)/emulparams/shelf_obsd.sh \
1431  $(srcdir)/emulparams/shelf.sh \
1432  $(srcdir)/emulparams/elf_obsd.sh \
1433  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1434	${GENSCRIPTS} shlelf_obsd "$(tdir_shlelf_obsd)"
1435eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
1436  $(srcdir)/emulparams/shelf.sh \
1437  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1438	${GENSCRIPTS} shlelf "$(tdir_shlelf)"
1439eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
1440  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
1441  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1442  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1443	${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
1444eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
1445  $(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
1446  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1447  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1448  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1449	${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
1450eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
1451  $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
1452  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1453  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1454  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1455	${GENSCRIPTS} shlelf32_nbsd "$(tdir_shlelf32_nbsd)"
1456eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
1457  $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
1458  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1459	${GENSCRIPTS} shlelf64 "$(tdir_shlelf64)"
1460eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
1461  $(srcdir)/emulparams/shelf64_nbsd.sh \
1462  $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
1463  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1464	${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
1465eshl.c: $(srcdir)/emulparams/shl.sh \
1466  $(srcdir)/emulparams/sh.sh \
1467  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
1468	${GENSCRIPTS} shl "$(tdir_shl)"
1469eshpe.c: $(srcdir)/emulparams/shpe.sh \
1470  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
1471	${GENSCRIPTS} shpe "$(tdir_shl)"
1472esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
1473  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1474	${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
1475esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
1476  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1477	${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
1478esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
1479  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
1480	${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
1481esparcnbsd.c:	$(srcdir)/emulparams/sparcnbsd.sh \
1482  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1483	${GENSCRIPTS} sparcnbsd "$(tdir_sparcnbsd)"
1484esparcobsd.c:	$(srcdir)/emulparams/sparcobsd.sh \
1485  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1486	${GENSCRIPTS} sparcobsd "$(tdir_sparcobsd)"
1487est2000.c: $(srcdir)/emulparams/st2000.sh \
1488  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS}
1489	${GENSCRIPTS} st2000 "$(tdir_st2000)"
1490esun3.c: $(srcdir)/emulparams/sun3.sh \
1491  $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1492	${GENSCRIPTS} sun3 "$(tdir_sun3)"
1493esun4.c: $(srcdir)/emulparams/sun4.sh \
1494  $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1495	${GENSCRIPTS} sun4 "$(tdir_sun4)"
1496etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
1497  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
1498	${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
1499etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
1500  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
1501	${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
1502etic3xcoff.c: $(srcdir)/emulparams/tic3xcoff.sh \
1503  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
1504	${GENSCRIPTS} tic3xcoff "$(tdir_tic4xcoff)"
1505etic3xcoff_onchip.c: $(srcdir)/emulparams/tic3xcoff_onchip.sh \
1506  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
1507	${GENSCRIPTS} tic3xcoff_onchip "$(tdir_tic4xcoff)"
1508etic4xcoff.c: $(srcdir)/emulparams/tic4xcoff.sh \
1509  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
1510	${GENSCRIPTS} tic4xcoff "$(tdir_tic4xcoff)"
1511etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \
1512  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS}
1513	${GENSCRIPTS} tic54xcoff "$(tdir_tic54xcoff)"
1514etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
1515  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
1516	${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
1517evanilla.c: $(srcdir)/emulparams/vanilla.sh \
1518  $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
1519	${GENSCRIPTS} vanilla "$(tdir_vanilla)"
1520evax.c: $(srcdir)/emulparams/vax.sh \
1521  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1522	${GENSCRIPTS} vax "$(tdir_vax)"
1523evaxnbsd.c: $(srcdir)/emulparams/vaxnbsd.sh \
1524  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1525	${GENSCRIPTS} vaxnbsd "$(tdir_vaxnbsd)"
1526evsta.c: $(srcdir)/emulparams/vsta.sh \
1527  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1528	${GENSCRIPTS} vsta "$(tdir_vsta)"
1529ev850.c: $(srcdir)/emulparams/v850.sh \
1530  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
1531	${GENSCRIPTS} v850 "$(tdir_v850)"
1532ew65.c: $(srcdir)/emulparams/w65.sh \
1533  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
1534	${GENSCRIPTS} w65 "$(tdir_w65)"
1535ez8001.c: $(srcdir)/emulparams/z8001.sh \
1536  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
1537	${GENSCRIPTS} z8001 "$(tdir_z8001)"
1538ez8002.c: $(srcdir)/emulparams/z8002.sh \
1539  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
1540	${GENSCRIPTS} z8002 "$(tdir_z8002)"
1541eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
1542  $(srcdir)/emulparams/elf32frv.sh \
1543  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1544	${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
1545
1546# We need this for automake to use YLWRAP.
1547EXTRA_ld_new_SOURCES = deffilep.y
1548
1549ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
1550	ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
1551ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(INTLDEPS)
1552ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
1553
1554# The generated emulation files mostly have the same dependencies.
1555$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
1556  ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
1557  ldctor.h ldexp.h ldlang.h ldgram.h
1558
1559# This is the real libbfd.a created by libtool.
1560TESTBFDLIB = @TESTBFDLIB@
1561
1562check-DEJAGNU: site.exp
1563	srcroot=`cd $(srcdir) && pwd`; export srcroot; \
1564	r=`pwd`; export r; \
1565	LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
1566	EXPECT=$(EXPECT); export EXPECT; \
1567	if [ -f $(top_builddir)/../expect/expect ]; then \
1568	  TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
1569	  export TCL_LIBRARY; \
1570	fi; \
1571	runtest=$(RUNTEST); \
1572	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
1573	  $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
1574		CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
1575		CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
1576		CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
1577		OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
1578		LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
1579		$(RUNTESTFLAGS); \
1580	else echo "WARNING: could not find \`runtest'" 1>&2; :;\
1581	fi
1582
1583# Rules for testing by relinking ld itself.
1584# A similar test is in the testsuite.  This target is for ease of use
1585# when porting ld.
1586
1587ld-partial.o: ld-new$(EXEEXT)
1588	./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
1589ld1$(EXEEXT): ld-partial.o
1590	./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
1591
1592ld1-full$(EXEEXT): ld-new
1593	./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
1594
1595ld2$(EXEEXT): ld1$(EXEEXT)
1596	./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
1597
1598ld3$(EXEEXT): ld2$(EXEEXT)
1599	./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
1600
1601bootstrap: ld3$(EXEEXT)
1602	cmp ld2$(EXEEXT) ld3$(EXEEXT)
1603
1604.PHONY: bootstrap
1605
1606# A test program for C++ constructors and destructors.
1607# This test is now in the testsuite.
1608#
1609#cdtest: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
1610#	./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
1611#	  cdtest-main.o cdtest-bar.o cdtest-foo.o $(HOSTING_LIBS)
1612#
1613#cdtest.out: cdtest
1614#	./cdtest > cdtest.tmp
1615#	mv cdtest.tmp cdtest.out
1616#
1617#cdtest-ur.o: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
1618#	./ld.new $(HOSTING_EMU) -o cdtest-ur.o -Ur cdtest-main.o \
1619#	  cdtest-bar.o cdtest-foo.o
1620#
1621#cdtest-ur: cdtest-ur.o
1622#	./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.o \
1623#	  $(HOSTING_LIBS)
1624#
1625#cdtest-ur.out: cdtest-ur
1626#	./cdtest-ur > cdtest-ur.tmp
1627#	mv cdtest-ur.tmp cdtest-ur.out
1628#
1629#check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
1630#	diff $(srcdir)/cdtest.exp cdtest.out
1631#	diff $(srcdir)/cdtest.exp cdtest-ur.out
1632#
1633#.PHONY: check-cdtest
1634
1635# END OF CHECK TARGETS
1636
1637# DOCUMENTATION TARGETS
1638# Manual configuration file; not usually attached to normal configuration,
1639# because almost all configs use "gen" version of manual.
1640#  Set DOCVER above to change.
1641configdoc.texi:	${DOCVER}-doc.texi
1642	ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
1643	  || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
1644	  || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
1645
1646ldver.texi: Makefile
1647	rm -f $@
1648	echo '@set VERSION $(VERSION)' > $@
1649
1650ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
1651	@rm -f $@ $@-[0-9] $@-[0-9][0-9]
1652	$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
1653
1654ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
1655	TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
1656	  MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
1657
1658# Build the man page from the texinfo file
1659# The sed command removes the no-adjust Nroff command so that
1660# the man output looks standard.
1661ld.1: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
1662	touch $@
1663	-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
1664	-($(POD2MAN) ld.pod | \
1665	        sed -e '/^.if n .na/d' > $@.T$$$$ && \
1666	        mv -f $@.T$$$$ $@) || \
1667	        (rm -f $@.T$$$$ && exit 1)
1668	rm -f ld.pod
1669
1670MAINTAINERCLEANFILES = ldver.texi
1671
1672# We want to reconfigure if configure.host or configure.tgt changes.
1673CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
1674
1675MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
1676	ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
1677mostlyclean-local:
1678	-rm -rf tmpdir
1679CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
1680
1681.PHONY: install-exec-local install-data-local
1682
1683install-exec-local: ld-new$(EXEEXT)
1684	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin
1685	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
1686	  if test -f $$p; then \
1687	    echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
1688	    $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
1689	  else :; fi; \
1690	done
1691	n=`echo ld | sed '$(transform)'`; \
1692	if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
1693	  rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
1694	  ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
1695	  || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
1696	fi
1697
1698install-data-local:
1699	$(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
1700	for f in ldscripts/*; do \
1701	  $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
1702	done
1703
1704# We want install to imply install-info as per GNU standards, despite the
1705# cygnus option.
1706install: install-info
1707
1708# Stuff that should be included in a distribution.  The diststuff
1709# target is run by the taz target in ../Makefile.in.
1710EXTRA_DIST = ldgram.c ldgram.h ldlex.c $(man_MANS)
1711diststuff: info $(EXTRA_DIST)
1712
1713DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
1714distclean-local:
1715	rm -rf ldscripts
1716
1717Makefile: $(BFDDIR)/configure.in
1718
1719# Targets to rebuild dependencies in this Makefile.
1720# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
1721DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
1722	rm -f DEP1
1723	$(MAKE) MKDEP="$(MKDEP)" DEP1
1724	sed -f dep.sed < DEP1 > DEPA
1725	echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
1726	if grep ' /' DEPA > /dev/null 2> /dev/null; then \
1727	  echo 'make DEP failed!'; exit 1; \
1728	else \
1729	  mv -f DEPA $@; \
1730	fi
1731
1732DEP1: $(CFILES) $(GENERATED_CFILES)
1733	echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
1734	echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
1735	$(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
1736	mv -f DEP2 $@
1737
1738dep.sed: dep-in.sed config.status
1739	sed <$(srcdir)/dep-in.sed >dep.sed	\
1740		-e 's!@INCDIR@!$(INCDIR)!'	\
1741		-e 's!@BFDDIR@!$(BFDDIR)!'	\
1742		-e 's!@SRCDIR@!$(srcdir)!'	\
1743		-e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/ld$$,,`'!'
1744
1745dep: DEP
1746	sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
1747	cat DEP >> tmp-Makefile
1748	$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
1749
1750dep-in: DEP
1751	sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
1752	cat DEP >> tmp-Makefile.in
1753	$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
1754
1755dep-am: DEP
1756	sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
1757	cat DEP >> tmp-Makefile.am
1758	$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
1759
1760.PHONY: dep dep-in dep-am
1761
1762@MAINT@.PHONY: mpw
1763@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \
1764@MAINT@	$(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \
1765@MAINT@	$(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c
1766@MAINT@
1767@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c
1768@MAINT@	$(SHELL) $(srcdir)/../move-if-change $< $@
1769@MAINT@
1770@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c
1771@MAINT@	$(SHELL) $(srcdir)/../move-if-change $< $@
1772@MAINT@
1773@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c
1774@MAINT@	$(SHELL) $(srcdir)/../move-if-change $< $@
1775@MAINT@
1776@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c
1777@MAINT@	$(SHELL) $(srcdir)/../move-if-change $< $@
1778@MAINT@
1779@MAINT@$(srcdir)/mpw-esh.c: esh.c
1780@MAINT@	$(SHELL) $(srcdir)/../move-if-change $< $@
1781@MAINT@
1782@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c
1783@MAINT@	$(SHELL) $(srcdir)/../move-if-change $< $@
1784
1785# What appears below is generated by a hacked mkdep using gcc -MM.
1786
1787# DO NOT DELETE THIS LINE -- mkdep uses it.
1788# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
1789ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1790  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1791  $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
1792  ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
1793ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1794  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1795  ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
1796  ldfile.h ldemul.h ldmain.h ldemul-list.h
1797ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1798  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1799  $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
1800  ldmisc.h ldexp.h ldgram.h ldlang.h $(INCDIR)/libiberty.h \
1801  $(INCDIR)/safe-ctype.h
1802ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1803  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1804  $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
1805  ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
1806  ldlex.h ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/filenames.h
1807ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1808  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1809  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
1810  $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
1811  ldexp.h ldlang.h ldgram.h ldlex.h ldmisc.h ldctor.h \
1812  ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h \
1813  $(INCDIR)/hashtab.h
1814ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1815  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1816  $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
1817  $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h ld.h $(INCDIR)/bin-bugs.h \
1818  ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
1819  ldlex.h ldfile.h ldemul.h ldctor.h
1820ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1821  $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h sysdep.h config.h \
1822  $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
1823  ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
1824  ldgram.h ldlex.h ldmain.h ldfile.h
1825ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1826  $(INCDIR)/symcat.h ../bfd/bfdver.h sysdep.h config.h \
1827  $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h ldver.h \
1828  ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h
1829ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1830  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1831  $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
1832  ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
1833  ldmisc.h ldgram.h ldmain.h
1834lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1835  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1836  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
1837  ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
1838  ldlang.h ldgram.h ldlex.h ldfile.h ldver.h ldemul.h \
1839  $(INCDIR)/demangle.h
1840mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
1841  sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
1842  ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
1843ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1844  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1845  $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h \
1846  ldmain.h ldmisc.h ldexp.h ldlang.h
1847pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1848  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1849  $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
1850  ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
1851  ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
1852  $(BFDDIR)/libcoff.h deffile.h pe-dll.h
1853ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1854  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1855  $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
1856  ldver.h ldlang.h ldfile.h ldemul.h ldmisc.h ldmain.h \
1857  mri.h ldctor.h ldlex.h
1858ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
1859  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
1860  $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
1861  ldmisc.h ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h \
1862  ldmain.h $(INCDIR)/libiberty.h
1863deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
1864  $(INCDIR)/safe-ctype.h ../bfd/bfd.h $(INCDIR)/symcat.h \
1865  sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
1866  ldmisc.h deffile.h
1867# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
1868