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