1## Process this file with automake to generate Makefile.in
2#
3#   Copyright (C) 2012-2016 Free Software Foundation, Inc.
4#
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; see the file COPYING3.  If not see
17# <http://www.gnu.org/licenses/>.
18#
19
20AUTOMAKE_OPTIONS = dejagnu no-texinfo.tex no-dist foreign
21ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
22TEXINFO_TEX = ../texinfo/texinfo.tex
23
24SUBDIRS = po
25
26tooldir = $(exec_prefix)/$(target_alias)
27
28YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
29YFLAGS = -d
30LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
31
32# Automake 1.10+ disables lex and yacc output file regeneration if
33# maintainer mode is disabled.  Avoid this.
34am__skiplex =
35am__skipyacc =
36
37ELF_CLFAGS=-DELF_LIST_OPTIONS=@elf_list_options@ \
38	   -DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
39	   -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
40WARN_CFLAGS = @WARN_CFLAGS@
41NO_WERROR = @NO_WERROR@
42AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
43
44# Conditionally enable the plugin interface.
45if ENABLE_PLUGINS
46PLUGIN_C = plugin.c
47PLUGIN_H = plugin.h
48PLUGIN_OBJECT = plugin.@OBJEXT@
49PLUGIN_CFLAGS = -DENABLE_PLUGINS
50else
51PLUGIN_C =
52PLUGIN_H =
53PLUGIN_OBJECT =
54PLUGIN_CFLAGS =
55endif
56
57# We put the scripts in the directory $(scriptdir)/ldscripts.
58# We can't put the scripts in $(datadir) because the SEARCH_DIR
59# directives need to be different for native and cross linkers.
60scriptdir = $(tooldir)/lib
61
62EMUL = @EMUL@
63EMULATION_OFILES = @EMULATION_OFILES@
64EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
65
66
67# Search path to override the default search path for -lfoo libraries.
68# If LIB_PATH is empty, the ones in the script (if any) are left alone.
69# (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
70# a cross-linker, in which case the default is empty.  See genscripts.sh.)
71# Otherwise, they are replaced with the ones given in LIB_PATH,
72# which may have the form: LIB_PATH=/lib:/usr/local/lib.  This can be set
73# when the linker is configured via the --with-lib-path configure switch.
74LIB_PATH = @LIB_PATH@
75
76BASEDIR = $(srcdir)/..
77BFDDIR = $(BASEDIR)/bfd
78INCDIR	= $(BASEDIR)/include
79
80# What version of the manual to build
81DOCVER = gen
82
83# Options to extract the man page from ld.texinfo
84MANCONF = -Dman
85
86TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
87
88POD2MAN = pod2man --center="GNU Development Tools" \
89	--release="binutils-$(VERSION)" --section=1
90
91#stuff for self hosting (can be overridden in config file).
92HOSTING_CRT0 = @HOSTING_CRT0@
93HOSTING_SCRT0 = @HOSTING_SCRT0@
94HOSTING_LIBS = @HOSTING_LIBS@
95HOSTING_SLIBS = @HOSTING_SLIBS@
96HOSTING_EMU = -m $(EMUL)
97
98# Setup the testing framework, if you have one
99EXPECT = expect
100RUNTEST = runtest
101RUNTESTFLAGS =
102
103CC_FOR_TARGET = ` \
104  if [ -f $$r/../gcc/xgcc ] ; then \
105    if [ -f $$r/../newlib/Makefile ] ; then \
106      echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
107    else \
108      echo $$r/../gcc/xgcc -B$$r/../gcc/; \
109    fi; \
110  else \
111    if [ "@host@" = "@target@" ] ; then \
112      echo $(CC); \
113    else \
114      echo gcc | sed '$(transform)'; \
115    fi; \
116  fi`
117
118CXX_FOR_TARGET = ` \
119  if [ -f $$r/../gcc/g++ ] ; then \
120    if [ -f $$r/../newlib/Makefile ] ; then \
121      echo $$r/../gcc/g++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
122    else \
123      echo $$r/../gcc/g++ -B$$r/../gcc/; \
124    fi; \
125  elif [ -f $$r/../gcc/xg++ ] ; then \
126    if [ -f $$r/../newlib/Makefile ] ; then \
127      echo $$r/../gcc/xg++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
128    else \
129      echo $$r/../gcc/xg++ -B$$r/../gcc/; \
130    fi; \
131  else \
132    if [ "@host@" = "@target@" ] ; then \
133      echo $(CXX); \
134    else \
135      echo g++ | sed '$(transform)'; \
136    fi; \
137  fi`
138
139transform = s/^ld-new$$/$(installed_linker)/;@program_transform_name@
140bin_PROGRAMS = ld-new
141info_TEXINFOS = ld.texinfo
142ld_TEXINFOS = configdoc.texi
143noinst_TEXINFOS = ldint.texinfo
144man_MANS = ld.1
145
146AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
147		   -I $(top_srcdir)/../libiberty
148TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
149		    -I $(top_srcdir)/../libiberty
150
151AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
152	@INCINTL@ $(HDEFINES) $(CFLAGS) $(PLUGIN_CFLAGS) \
153	-DLOCALEDIR="\"$(datadir)/locale\""
154
155BFDLIB = ../bfd/libbfd.la
156LIBIBERTY = ../libiberty/libiberty.a
157
158ALL_EMULATION_SOURCES = \
159	eaix5ppc.c \
160	eaix5rs6.c \
161	eaixppc.c \
162	eaixrs6.c \
163	ealpha.c \
164	ealphavms.c \
165	earcv2elf.c \
166	earcv2elfx.c \
167	earcelf.c \
168	earcelf_prof.c \
169	earclinux.c \
170	earclinux_prof.c \
171	earm_epoc_pe.c \
172	earm_wince_pe.c \
173	earmaoutb.c \
174	earmaoutl.c \
175	earmcoff.c \
176	earmelf.c \
177	earmelf_fbsd.c \
178	earmelf_linux.c \
179	earmelf_linux_eabi.c \
180	earmelf_nacl.c \
181	earmelf_nbsd.c \
182	earmelf_phoenix.c \
183	earmelf_vxworks.c \
184	earmelfb.c \
185	earmelfb_fbsd.c \
186	earmelfb_linux.c \
187	earmelfb_linux_eabi.c \
188	earmelfb_nacl.c \
189	earmelfb_nbsd.c \
190	earmnbsd.c \
191	earmnto.c \
192	earmpe.c \
193	earmsymbian.c \
194	eavr1.c \
195	eavr2.c \
196	eavr25.c \
197	eavr3.c \
198	eavr31.c \
199	eavr35.c \
200	eavr4.c \
201	eavr5.c \
202	eavr51.c \
203	eavr6.c \
204	eavrxmega1.c \
205	eavrxmega2.c \
206	eavrxmega3.c \
207	eavrxmega4.c \
208	eavrxmega5.c \
209	eavrxmega6.c \
210	eavrxmega7.c \
211	eavrtiny.c   \
212	ecoff_i860.c \
213	ecoff_sparc.c \
214	ecrisaout.c \
215	ecriself.c \
216	ecrislinux.c \
217	ed10velf.c \
218	ed30v_e.c \
219	ed30v_o.c \
220	ed30velf.c \
221	edelta68.c \
222	eelf32_dlx.c \
223	eelf32_i860.c \
224	eelf32_i960.c \
225	eelf32_sparc.c \
226	eelf32_sparc_sol2.c \
227	eelf32_sparc_vxworks.c \
228	eelf32_spu.c \
229	eelf32_tic6x_be.c \
230	eelf32_tic6x_le.c \
231	eelf32_tic6x_linux_be.c \
232	eelf32_tic6x_linux_le.c \
233	eelf32_tic6x_elf_be.c \
234	eelf32_tic6x_elf_le.c \
235	eelf32am33lin.c \
236	eelf32bfin.c \
237	eelf32bfinfd.c \
238	eelf32cr16.c \
239	eelf32cr16c.c \
240	eelf32crx.c \
241	eelf32epiphany.c \
242	eelf32epiphany_4x4.c \
243	eelf32fr30.c \
244	eelf32frv.c \
245	eelf32frvfd.c \
246	eelf32ft32.c \
247	eelf32i370.c \
248	eelf32ip2k.c \
249	eelf32iq10.c \
250	eelf32iq2000.c \
251	eelf32lm32.c \
252	eelf32lm32fd.c \
253	eelf32lppc.c \
254	eelf32lppclinux.c \
255	eelf32lppcnto.c \
256	eelf32lppcsim.c \
257	eelf32m32c.c \
258	eelf32mb_linux.c \
259	eelf32mbel_linux.c \
260	eelf32mcore.c \
261	eelf32mep.c \
262	eelf32metag.c \
263	eelf32microblazeel.c \
264	eelf32microblaze.c \
265	eelf32moxie.c \
266	emoxiebox.c \
267	eelf32mt.c \
268	eelf32or1k.c \
269	eelf32or1k_linux.c \
270	eelf32ppc.c \
271	eelf32ppc_fbsd.c \
272	eelf32ppclinux.c \
273	eelf32ppcnto.c \
274	eelf32ppcsim.c \
275	eelf32ppcvxworks.c \
276	eelf32ppcwindiss.c \
277	eelf32rl78.c \
278	eelf32rx.c \
279	eelf32tilegx.c \
280	eelf32tilegx_be.c \
281	eelf32tilepro.c \
282	eelf32vax.c \
283	eelf32visium.c \
284	eelf32xc16x.c \
285	eelf32xc16xl.c \
286	eelf32xc16xs.c \
287	eelf32xstormy16.c \
288	eelf32xtensa.c \
289	eelf_i386.c \
290	eelf_i386_be.c \
291	eelf_i386_chaos.c \
292	eelf_i386_fbsd.c \
293	eelf_i386_ldso.c \
294	eelf_i386_nacl.c \
295	eelf_i386_sol2.c \
296	eelf_i386_vxworks.c \
297	eelf_iamcu.c \
298	eelf_s390.c \
299	egld960.c \
300	egld960coff.c \
301	eh8300.c \
302	eh8300elf.c \
303	eh8300elf_linux.c \
304	eh8300h.c \
305	eh8300helf.c \
306	eh8300helf_linux.c \
307	eh8300hn.c \
308	eh8300hnelf.c \
309	eh8300s.c \
310	eh8300self.c \
311	eh8300self_linux.c \
312	eh8300sn.c \
313	eh8300snelf.c \
314	eh8300sx.c \
315	eh8300sxelf.c \
316	eh8300sxelf_linux.c \
317	eh8300sxn.c \
318	eh8300sxnelf.c \
319	eh8500.c \
320	eh8500b.c \
321	eh8500c.c \
322	eh8500m.c \
323	eh8500s.c \
324	ehp300bsd.c \
325	ehp3hpux.c \
326	ehppaelf.c \
327	ehppalinux.c \
328	ehppanbsd.c \
329	ehppaobsd.c \
330	ei386aout.c \
331	ei386beos.c \
332	ei386bsd.c \
333	ei386coff.c \
334	ei386go32.c \
335	ei386linux.c \
336	ei386lynx.c \
337	ei386mach.c \
338	ei386moss.c \
339	ei386msdos.c \
340	ei386nbsd.c \
341	ei386nto.c \
342	ei386nw.c \
343	ei386pe.c \
344	ei386pe_posix.c \
345	elnk960.c \
346	em32relf.c \
347	em32relf_linux.c \
348	em32rlelf.c \
349	em32rlelf_linux.c \
350	em68hc11elf.c \
351	em68hc11elfb.c \
352	em68hc12elf.c \
353	em68hc12elfb.c \
354	em68k4knbsd.c \
355	em68kaout.c \
356	em68kaux.c \
357	em68kcoff.c \
358	em68kelf.c \
359	em68kelfnbsd.c \
360	em68klinux.c \
361	em68knbsd.c \
362	em68kpsos.c \
363	em88kbcs.c \
364	emcorepe.c \
365	emn10200.c \
366	emn10300.c \
367	emsp430elf.c \
368	emsp430X.c \
369	ends32elf.c \
370	ends32elf16m.c \
371	ends32elf_linux.c \
372	ends32belf.c \
373	ends32belf16m.c \
374	ends32belf_linux.c \
375	enews.c \
376	ens32knbsd.c \
377	enios2elf.c \
378	enios2linux.c \
379	epc532macha.c \
380	epdp11.c \
381	epjelf.c \
382	epjlelf.c \
383	eppclynx.c \
384	eppcmacos.c \
385	eppcnw.c \
386	eppcpe.c \
387	eriscix.c \
388	escore3_elf.c \
389	escore7_elf.c \
390	esh.c \
391	eshelf.c \
392	eshelf32.c \
393	eshelf32_linux.c \
394	eshelf32_nbsd.c \
395	eshelf_fd.c \
396	eshelf_linux.c \
397	eshelf_nbsd.c \
398	eshelf_nto.c \
399	eshelf_uclinux.c \
400	eshelf_vxworks.c \
401	eshl.c \
402	eshlelf.c \
403	eshlelf32.c \
404	eshlelf32_linux.c \
405	eshlelf32_nbsd.c \
406	eshlelf_fd.c \
407	eshlelf_linux.c \
408	eshlelf_nbsd.c \
409	eshlelf_nto.c \
410	eshlelf_vxworks.c \
411	eshlsymbian.c \
412	eshpe.c \
413	esparcaout.c \
414	esparclinux.c \
415	esparcnbsd.c \
416	est2000.c \
417	esun3.c \
418	esun4.c \
419	etic30aout.c \
420	etic30coff.c \
421	etic3xcoff.c \
422	etic3xcoff_onchip.c \
423	etic4xcoff.c \
424	etic54xcoff.c \
425	etic80coff.c \
426	ev850.c \
427	ev850_rh850.c \
428	evanilla.c \
429	evax.c \
430	evaxnbsd.c \
431	evsta.c \
432	ew65.c \
433	exgateelf.c \
434	ez80.c \
435	ez8001.c \
436	ez8002.c
437
438ALL_EMULATIONS = $(ALL_EMULATION_SOURCES:.c=.@OBJEXT@)
439
440ALL_64_EMULATION_SOURCES = \
441	eaarch64elf.c \
442	eaarch64elf32.c \
443	eaarch64elfb.c \
444	eaarch64elf32b.c \
445	eaarch64cloudabi.c \
446	eaarch64cloudabib.c \
447	eaarch64fbsd.c \
448	eaarch64fbsdb.c \
449	eaarch64linux.c \
450	eaarch64linuxb.c \
451	eaarch64linux32.c \
452	eaarch64linux32b.c \
453	eelf32_x86_64.c \
454	eelf32_x86_64_nacl.c \
455	eelf32b4300.c \
456	eelf32bmip.c \
457	eelf32bmipn32.c \
458	eelf32bsmip.c \
459	eelf32btsmip.c \
460	eelf32btsmip_fbsd.c \
461	eelf32btsmipn32.c \
462	eelf32btsmipn32_fbsd.c \
463	eelf32ebmip.c \
464	eelf32ebmipvxworks.c \
465	eelf32elmip.c \
466	eelf32elmipvxworks.c \
467	eelf32l4300.c \
468	eelf32lmip.c \
469	eelf32lr5900.c \
470	eelf32lr5900n32.c \
471	eelf32lsmip.c \
472	eelf32ltsmip.c \
473	eelf32ltsmip_fbsd.c \
474	eelf32ltsmipn32.c \
475	eelf32ltsmipn32_fbsd.c \
476	eelf32mipswindiss.c \
477	eelf64_aix.c \
478	eelf64_ia64.c \
479	eelf64_ia64_fbsd.c \
480	eelf64_ia64_vms.c \
481	eelf64_s390.c \
482	eelf64_sparc.c \
483	eelf64_sparc_fbsd.c \
484	eelf64_sparc_sol2.c \
485	eelf64alpha.c \
486	eelf64alpha_fbsd.c \
487	eelf64alpha_nbsd.c \
488	eelf64bmip.c \
489	eelf64btsmip.c \
490	eelf64btsmip_fbsd.c \
491	eelf64hppa.c \
492	eelf64lppc.c \
493	eelf64ltsmip.c \
494	eelf64ltsmip_fbsd.c \
495	eelf64mmix.c \
496	eelf64ppc.c \
497	eelf64ppc_fbsd.c \
498	eelf64rdos.c \
499	eelf64tilegx.c \
500	eelf64tilegx_be.c \
501	eelf_l1om.c \
502	eelf_l1om_fbsd.c \
503	eelf_k1om.c \
504	eelf_k1om_fbsd.c \
505	eelf_x86_64.c \
506	eelf_x86_64_cloudabi.c \
507	eelf_x86_64_fbsd.c \
508	eelf_x86_64_nacl.c \
509	eelf_x86_64_sol2.c \
510	ehppa64linux.c \
511	ei386pep.c \
512	emmo.c \
513	eshelf64.c \
514	eshelf64_nbsd.c \
515	eshlelf64.c \
516	eshlelf64_nbsd.c
517
518ALL_64_EMULATIONS = $(ALL_64_EMULATION_SOURCES:.c=.@OBJEXT@)
519
520ALL_EMUL_EXTRA_OFILES = \
521	deffilep.@OBJEXT@ \
522	pe-dll.@OBJEXT@
523
524ALL_64_EMUL_EXTRA_OFILES = \
525	pep-dll.@OBJEXT@
526
527CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
528	ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
529	mri.c ldcref.c pe-dll.c pep-dll.c ldlex-wrapper.c \
530	$(PLUGIN_C) ldbuildid.c
531
532HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
533	ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
534	ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h \
535	elf-hints-local.h $(PLUGIN_H) ldbuildid.h
536
537GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
538GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
539
540# Require an early dependency on the generated headers, as the dependency
541# tracking will not cause them to be built beforehand.
542BUILT_SOURCES = $(GENERATED_HFILES)
543
544OFILES = ldgram.@OBJEXT@ ldlex-wrapper.@OBJEXT@ lexsup.@OBJEXT@ ldlang.@OBJEXT@ \
545	mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ $(PLUGIN_OBJECT) \
546	ldwrite.@OBJEXT@ ldexp.@OBJEXT@  ldemul.@OBJEXT@ ldver.@OBJEXT@ ldmisc.@OBJEXT@ \
547	ldfile.@OBJEXT@ ldcref.@OBJEXT@ ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES} \
548	ldbuildid.@OBJEXT@
549
550STAGESTUFF = *.@OBJEXT@ ldscripts/* e*.c
551
552# Disable -Werror, if it has been enabled, since old versions of bison/
553# yacc will produce working code which contain compile time warnings.
554ldgram.@OBJEXT@: ldgram.c
555if am__fastdepCC
556	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR)
557	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
558else
559if AMDEP
560	source='ldgram.c' object='$@' libtool=no @AMDEPBACKSLASH@
561	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
562endif
563	$(COMPILE) -c `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR)
564endif
565
566ldlex-wrapper.@OBJEXT@: ldlex-wrapper.c ldlex.c
567if am__fastdepCC
568	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/ldlex-wrapper.c $(NO_WERROR)
569	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
570else
571if AMDEP
572	source='ldlex-wrapper.c' object='$@' libtool=no @AMDEPBACKSLASH@
573	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
574endif
575	$(COMPILE) -c $(srcdir)/ldlex-wrapper.c $(NO_WERROR)
576endif
577
578deffilep.@OBJEXT@: deffilep.c
579if am__fastdepCC
580	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR)
581	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
582else
583if AMDEP
584	source='deffilep.c' object='$@' libtool=no @AMDEPBACKSLASH@
585	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
586endif
587	$(COMPILE) -c `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR)
588endif
589
590# At the moment this is just a list of those emulation template files
591# that contain internationalised strings.
592EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
593
594POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
595
596po/POTFILES.in: @MAINT@ Makefile
597	for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
598	  && mv tmp $(srcdir)/po/POTFILES.in
599
600ldmain.@OBJEXT@: ldmain.c config.status
601if am__fastdepCC
602	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
603	  -DDEFAULT_EMULATION='"$(EMUL)"' \
604	  -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \
605	  -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
606	  $(srcdir)/ldmain.c
607	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
608else
609if AMDEP
610	source='ldmain.c' object='$@' libtool=no @AMDEPBACKSLASH@
611	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
612endif
613	$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' \
614	  -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \
615	  -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
616	  $(srcdir)/ldmain.c
617endif
618
619ldfile.@OBJEXT@: ldfile.c config.status
620if am__fastdepCC
621	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
622	-DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \
623	 $(srcdir)/ldfile.c
624	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
625else
626if AMDEP
627	source='ldfile.c' object='$@' libtool=no @AMDEPBACKSLASH@
628	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
629endif
630	$(COMPILE) -c -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' \
631	  -DTOOLBINDIR='"$(tooldir)/bin"' \
632	  $(srcdir)/ldfile.c
633endif
634
635eelf32_spu.@OBJEXT@: eelf32_spu.c
636if am__fastdepCC
637	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
638	  -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" eelf32_spu.c
639	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
640else
641if AMDEP
642	source='eelf32_spu.c' object='$@' libtool=no @AMDEPBACKSLASH@
643	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
644endif
645	$(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \
646	  eelf32_spu.c
647endif
648
649ldemul-list.h: Makefile
650	(echo "/* This file is automatically generated.  DO NOT EDIT! */";\
651	for f in `echo " " ${EMULATION_OFILES} "" \
652	 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
653	    echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
654	done;\
655	echo "";\
656	echo "#define EMULATION_LIST \\";\
657	for f in `echo " " ${EMULATION_OFILES} "" \
658	 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
659	    echo "  &ld_$${f}_emulation, \\"; \
660	done;\
661	echo "  0") >ldemul-tmp.h
662	mv ldemul-tmp.h ldemul-list.h
663
664stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
665	  cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
666
667# These all start with e so 'make clean' can find them.
668
669GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ @enable_initfini_array@
670GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
671ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/scripttempl/DWARF.sc
672ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em $(srcdir)/scripttempl/DWARF.sc
673ELF_X86_DEPS = $(ELF_DEPS) $(srcdir)/emulparams/plt_unwind.sh \
674	       $(srcdir)/emulparams/extern_protected_data.sh \
675	       $(srcdir)/emulparams/dynamic_undefined_weak.sh \
676	       $(srcdir)/emulparams/reloc_overflow.sh \
677	       $(srcdir)/emulparams/call_nop.sh
678
679@TDIRS@
680
681# We can't use pattern rules as we don't want to depend on GNU
682# make, or else these rules could have been expressed in one
683# two-liner: 'e%.c:' and '	${GENSCRIPTS} $* "$(tdir_$*)"'.
684# (The recursive variable expansion is portable.)
685
686run-genscripts:
687	${GENSCRIPTS} $(script_target) "$($(script_tdirname))"
688
689.PHONY: run-genscripts
690
691$(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES):
692	base=`echo $@ | sed -e 's,e\(.*\).c,\1,'`; \
693	$(MAKE) run-genscripts "script_target=$$base" "script_tdirname=tdir_$$base"
694
695eaix5ppc.c: $(srcdir)/emulparams/aix5ppc.sh \
696  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
697
698eaix5rs6.c: $(srcdir)/emulparams/aix5rs6.sh \
699  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
700
701eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
702  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
703
704eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
705  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
706
707ealpha.c: $(srcdir)/emulparams/alpha.sh \
708  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
709
710ealphavms.c: $(srcdir)/emulparams/alphavms.sh \
711  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/vms.em \
712  $(srcdir)/emultempl/needrelax.em \
713  $(srcdir)/scripttempl/alphavms.sc ${GEN_DEPENDS}
714
715earcv2elf.c: $(srcdir)/emulparams/arcv2elf.sh \
716  $(ELF_DEPS) $(srcdir)/scripttempl/elfarcv2.sc ${GEN_DEPENDS}
717
718earcv2elfx.c: $(srcdir)/emulparams/arcv2elfx.sh \
719  $(ELF_DEPS) $(srcdir)/scripttempl/elfarcv2.sc ${GEN_DEPENDS}
720
721earcelf.c: $(srcdir)/emulparams/arcelf.sh \
722  $(ELF_DEPS) $(srcdir)/scripttempl/elfarc.sc ${GEN_DEPENDS}
723
724earcelf_prof.c: $(srcdir)/emulparams/arcelf_prof.sh \
725  $(ELF_DEPS) $(srcdir)/scripttempl/elfarc.sc ${GEN_DEPENDS}
726
727#for linux on arc
728earclinux.c: $(srcdir)/emulparams/arclinux.sh \
729  $(ELF_DEPS) $(srcdir)/emultempl/arclinux.em \
730  $(srcdir)/scripttempl/arclinux.sc ${GEN_DEPENDS}
731
732earclinux_prof.c: $(srcdir)/emulparams/arclinux_prof.sh \
733  $(ELF_DEPS) $(srcdir)/emultempl/arclinux.em \
734  $(srcdir)/scripttempl/arclinux.sc ${GEN_DEPENDS}
735
736earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
737  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
738
739earm_wince_pe.c: $(srcdir)/emulparams/arm_wince_pe.sh \
740  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
741
742earmaoutb.c:	$(srcdir)/emulparams/armaoutb.sh \
743  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
744
745earmaoutl.c:	$(srcdir)/emulparams/armaoutl.sh \
746  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
747
748earmcoff.c:	$(srcdir)/emulparams/armcoff.sh \
749  $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
750
751earmelf.c: $(srcdir)/emulparams/armelf.sh \
752  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
753  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
754
755earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
756  $(srcdir)/emulparams/armelf.sh \
757  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
758  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
759
760earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
761  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
762  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
763
764earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
765  $(srcdir)/emulparams/armelf_linux.sh \
766  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
767  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
768
769earmelf_nacl.c: $(srcdir)/emulparams/armelf_nacl.sh \
770  $(srcdir)/emulparams/armelf_linux_eabi.sh \
771  $(srcdir)/emulparams/armelf_linux.sh \
772  $(srcdir)/emulparams/elf_nacl.sh \
773  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
774  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
775
776earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
777  $(srcdir)/emulparams/armelf.sh \
778  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
779  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
780
781earmelf_phoenix.c: $(srcdir)/emulparams/armelf_phoenix.sh \
782  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
783  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
784
785earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
786  $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
787  $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
788  $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
789  ${GEN_DEPENDS}
790
791earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
792  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
793  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
794
795earmelfb_fbsd.c: $(srcdir)/emulparams/armelfb_fbsd.sh \
796  $(srcdir)/emulparams/armelf_fbsd.sh \
797  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
798  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
799
800earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
801  $(srcdir)/emulparams/armelf_linux.sh \
802  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
803  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
804
805earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
806  $(srcdir)/emulparams/armelf_linux_eabi.sh \
807  $(srcdir)/emulparams/armelf_linux.sh \
808  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
809  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
810
811earmelfb_nacl.c: $(srcdir)/emulparams/armelfb_nacl.sh \
812  $(srcdir)/emulparams/armelf_nacl.sh \
813  $(srcdir)/emulparams/armelf_linux_eabi.sh \
814  $(srcdir)/emulparams/armelf_linux.sh \
815  $(srcdir)/emulparams/elf_nacl.sh \
816  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
817  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
818
819earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
820  $(srcdir)/emulparams/armelf_nbsd.sh \
821  $(srcdir)/emulparams/armelf.sh \
822  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
823  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
824
825earmnbsd.c:	$(srcdir)/emulparams/armnbsd.sh \
826  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
827
828earmnto.c: $(srcdir)/emulparams/armnto.sh \
829  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
830  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
831
832earmpe.c: $(srcdir)/emulparams/armpe.sh \
833  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
834
835earmsymbian.c: $(srcdir)/emulparams/armsymbian.sh \
836  $(srcdir)/emulparams/armelf.sh $(ELF_DEPS) \
837  $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/armbpabi.sc \
838  ${GEN_DEPENDS}
839
840eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \
841  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
842  ${GEN_DEPENDS}
843
844eavr2.c: $(srcdir)/emulparams/avr2.sh $(srcdir)/emultempl/avrelf.em \
845  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
846  ${GEN_DEPENDS}
847
848eavr25.c: $(srcdir)/emulparams/avr25.sh $(srcdir)/emultempl/avrelf.em \
849  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
850  ${GEN_DEPENDS}
851
852eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \
853  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
854  ${GEN_DEPENDS}
855
856eavr31.c: $(srcdir)/emulparams/avr31.sh $(srcdir)/emultempl/avrelf.em \
857  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
858  ${GEN_DEPENDS}
859
860eavr35.c: $(srcdir)/emulparams/avr35.sh $(srcdir)/emultempl/avrelf.em \
861  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
862  ${GEN_DEPENDS}
863
864eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \
865  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
866  ${GEN_DEPENDS}
867
868eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \
869  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
870  ${GEN_DEPENDS}
871
872eavr51.c: $(srcdir)/emulparams/avr51.sh $(srcdir)/emultempl/avrelf.em \
873  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
874  ${GEN_DEPENDS}
875
876eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \
877  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
878  ${GEN_DEPENDS}
879
880eavrxmega1.c: $(srcdir)/emulparams/avrxmega1.sh \
881  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
882  ${GEN_DEPENDS}
883
884eavrxmega2.c: $(srcdir)/emulparams/avrxmega2.sh \
885  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
886  ${GEN_DEPENDS}
887
888eavrxmega3.c: $(srcdir)/emulparams/avrxmega3.sh \
889  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
890  ${GEN_DEPENDS}
891
892eavrxmega4.c: $(srcdir)/emulparams/avrxmega4.sh \
893  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
894  ${GEN_DEPENDS}
895
896eavrxmega5.c: $(srcdir)/emulparams/avrxmega5.sh \
897  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
898  ${GEN_DEPENDS}
899
900eavrxmega6.c: $(srcdir)/emulparams/avrxmega6.sh \
901  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
902  ${GEN_DEPENDS}
903
904eavrxmega7.c: $(srcdir)/emulparams/avrxmega7.sh \
905  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
906  ${GEN_DEPENDS}
907
908eavrtiny.c: $(srcdir)/emulparams/avrtiny.sh \
909  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avrtiny.sc \
910  ${GEN_DEPENDS}
911
912ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
913  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
914
915ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
916  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
917
918ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \
919  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS}
920
921ecriself.c: $(srcdir)/emulparams/criself.sh \
922  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
923
924ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
925  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
926
927ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
928  $(ELF_DEPS) $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
929
930ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
931  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
932
933ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
934  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
935
936ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
937  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
938
939edelta68.c: $(srcdir)/emulparams/delta68.sh \
940  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
941
942eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
943  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
944
945eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
946  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
947
948eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
949  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
950
951eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
952  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
953
954eelf32_sparc_sol2.c: $(srcdir)/emulparams/elf32_sparc_sol2.sh \
955  $(srcdir)/emulparams/elf32_sparc.sh \
956  $(srcdir)/emulparams/solaris2.sh \
957  $(srcdir)/emultempl/solaris2.em $(ELF_DEPS) \
958  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
959
960eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \
961  $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/elf32_sparc.sh \
962  $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
963  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
964
965eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \
966  $(srcdir)/emultempl/spu_ovl.@OBJEXT@_c $(srcdir)/emultempl/spu_icache.@OBJEXT@_c \
967  ldemul-list.h \
968  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
969
970$(srcdir)/emultempl/spu_ovl.@OBJEXT@_c: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
971	if ../gas/as-new --version \
972		| grep 'target.*spu' >/dev/null 2>/dev/null; then \
973	  cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s; \
974	  ../gas/as-new -o spu_ovl.@OBJEXT@ spu_ovl.s; \
975	  ../binutils/bin2c <spu_ovl.@OBJEXT@ >$@; \
976	fi
977$(srcdir)/emultempl/spu_icache.@OBJEXT@_c: @MAINT@ $(srcdir)/emultempl/spu_icache.S
978	if ../gas/as-new --version \
979		| grep 'target.*spu' >/dev/null 2>/dev/null; then \
980	  cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_icache.S spu_icache.s; \
981	  ../gas/as-new -o spu_icache.@OBJEXT@ spu_icache.s; \
982	  ../binutils/bin2c <spu_icache.@OBJEXT@ >$@; \
983	fi
984eelf32_tic6x_be.c: $(srcdir)/emulparams/elf32_tic6x_be.sh \
985  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/tic6xdsbt.em \
986  ${GEN_DEPENDS}
987
988eelf32_tic6x_elf_be.c: $(srcdir)/emulparams/elf32_tic6x_elf_be.sh \
989  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc  $(srcdir)/emultempl/tic6xdsbt.em \
990  ${GEN_DEPENDS}
991
992eelf32_tic6x_elf_le.c: $(srcdir)/emulparams/elf32_tic6x_elf_le.sh \
993  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc  $(srcdir)/emultempl/tic6xdsbt.em \
994  ${GEN_DEPENDS}
995
996eelf32_tic6x_le.c: $(srcdir)/emulparams/elf32_tic6x_le.sh \
997  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/tic6xdsbt.em \
998  ${GEN_DEPENDS}
999
1000eelf32_tic6x_linux_be.c: $(srcdir)/emulparams/elf32_tic6x_linux_be.sh \
1001  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc  $(srcdir)/emultempl/tic6xdsbt.em \
1002  ${GEN_DEPENDS}
1003
1004eelf32_tic6x_linux_le.c: $(srcdir)/emulparams/elf32_tic6x_linux_le.sh \
1005  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc  $(srcdir)/emultempl/tic6xdsbt.em \
1006  ${GEN_DEPENDS}
1007
1008eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
1009  $(srcdir)/emulparams/elf32am33lin.sh \
1010  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1011
1012eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
1013  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
1014  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1015
1016eelf32bfin.c: $(srcdir)/emulparams/elf32bfin.sh \
1017  $(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
1018  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1019
1020eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh \
1021  $(srcdir)/emulparams/elf32bfin.sh \
1022  $(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
1023  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1024
1025eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
1026  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1027
1028eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
1029  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1030  $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
1031  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1032
1033eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
1034  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) $(srcdir)/emultempl/irix.em \
1035  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1036
1037eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
1038  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
1039  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1040
1041eelf32btsmip_fbsd.c: $(srcdir)/emulparams/elf32btsmip_fbsd.sh \
1042  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
1043  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1044
1045eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
1046  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1047  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1048
1049eelf32btsmipn32_fbsd.c: $(srcdir)/emulparams/elf32btsmipn32_fbsd.sh \
1050  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1051  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1052
1053eelf32cr16.c: $(srcdir)/emulparams/elf32cr16.sh \
1054  $(ELF_DEPS) $(srcdir)/emultempl/cr16elf.em \
1055  $(srcdir)/scripttempl/elf32cr16.sc ${GEN_DEPENDS}
1056
1057eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
1058  $(ELF_DEPS) $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
1059
1060eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
1061  $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
1062  $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
1063
1064eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
1065  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
1066  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1067
1068eelf32ebmipvxworks.c: $(srcdir)/emulparams/elf32ebmipvxworks.sh \
1069  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
1070  $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
1071  $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1072
1073eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
1074  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
1075  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
1076  ${GEN_DEPENDS}
1077
1078eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
1079  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
1080  $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
1081  $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1082
1083eelf32lr5900.c: $(srcdir)/emulparams/elf32lr5900.sh \
1084  $(srcdir)/emulparams/elf32bmip.sh \
1085  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
1086  ${GEN_DEPENDS}
1087
1088eelf32lr5900n32.c: $(srcdir)/emulparams/elf32lr5900n32.sh \
1089  $(srcdir)/emulparams/elf32bmipn32-defs.sh \
1090  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
1091  ${GEN_DEPENDS}
1092
1093eelf32epiphany.c: $(srcdir)/emulparams/elf32epiphany.sh \
1094  $(ELF_DEPS) ${GEN_DEPENDS}
1095
1096eelf32epiphany_4x4.c: $(srcdir)/emulparams/elf32epiphany_4x4.sh \
1097  $(srcdir)/emultempl/elf32.em \
1098  $(ELF_DEPS) $(srcdir)/scripttempl/epiphany_4x4.sc ${GEN_DEPENDS}
1099
1100eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
1101  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1102
1103eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
1104  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1105
1106eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
1107  $(srcdir)/emulparams/elf32frv.sh \
1108  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1109
1110eelf32ft32.c: $(srcdir)/emulparams/elf32ft32.sh \
1111  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1112
1113eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
1114  $(ELF_DEPS) $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
1115
1116eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
1117  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1118
1119eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
1120  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
1121
1122eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
1123  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
1124
1125eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
1126  $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
1127  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
1128  ${GEN_DEPENDS}
1129
1130eelf32lm32.c: $(srcdir)/emulparams/elf32lm32.sh \
1131  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1132
1133eelf32lm32fd.c: $(srcdir)/emulparams/elf32lm32fd.sh \
1134  $(srcdir)/emulparams/elf32lm32.sh $(ELF_DEPS) \
1135  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1136
1137eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
1138  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
1139  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1140
1141eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
1142  $(srcdir)/emulparams/elf32ppccommon.sh \
1143  $(srcdir)/emulparams/elf32ppc.sh \
1144  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1145  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1146
1147eelf32lppclinux.c: $(srcdir)/emulparams/elf32lppclinux.sh \
1148  $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
1149  $(srcdir)/emulparams/elf32ppccommon.sh \
1150  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1151  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1152
1153eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
1154  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
1155  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1156  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1157
1158eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
1159  $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
1160  $(srcdir)/emulparams/elf32ppccommon.sh \
1161  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1162  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1163
1164eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
1165  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
1166  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
1167  ${GEN_DEPENDS}
1168
1169eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
1170  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
1171  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
1172  ${GEN_DEPENDS}
1173
1174eelf32ltsmip_fbsd.c: $(srcdir)/emulparams/elf32ltsmip_fbsd.sh \
1175  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
1176  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
1177  ${GEN_DEPENDS}
1178
1179eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
1180  $(srcdir)/emulparams/elf32btsmipn32.sh \
1181  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1182  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1183
1184eelf32ltsmipn32_fbsd.c: $(srcdir)/emulparams/elf32ltsmipn32_fbsd.sh \
1185  $(srcdir)/emulparams/elf32btsmipn32.sh \
1186  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1187  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1188
1189eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
1190  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1191  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1192
1193eelf32mbel_linux.c: $(srcdir)/emulparams/elf32mbel_linux.sh \
1194  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1195
1196eelf32mb_linux.c: $(srcdir)/emulparams/elf32mb_linux.sh \
1197  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1198
1199eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
1200  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1201
1202eelf32mep.c: $(srcdir)/emulparams/elf32mep.sh \
1203  $(ELF_DEPS) $(srcdir)/scripttempl/mep.sc ${GEN_DEPENDS}
1204
1205eelf32metag.c: $(srcdir)/emulparams/elf32metag.sh \
1206  $(ELF_DEPS) $(srcdir)/emultempl/metagelf.em \
1207  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1208
1209eelf32microblazeel.c: $(srcdir)/emulparams/elf32microblazeel.sh \
1210  $(ELF_DEPS) $(srcdir)/scripttempl/elfmicroblaze.sc ${GEN_DEPENDS}
1211
1212eelf32microblaze.c: $(srcdir)/emulparams/elf32microblaze.sh \
1213  $(ELF_DEPS) $(srcdir)/scripttempl/elfmicroblaze.sc ${GEN_DEPENDS}
1214
1215eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
1216  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1217
1218eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \
1219  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1220
1221emoxiebox.c: $(srcdir)/emulparams/moxiebox.sh \
1222  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1223
1224eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
1225  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1226
1227eelf32or1k.c: $(srcdir)/emulparams/elf32or1k.sh \
1228  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1229
1230eelf32or1k_linux.c: $(srcdir)/emulparams/elf32or1k_linux.sh \
1231  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1232
1233eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
1234  $(srcdir)/emulparams/elf32ppccommon.sh \
1235  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1236  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1237
1238eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
1239  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
1240  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1241  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1242
1243eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
1244  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
1245  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1246  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1247
1248eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
1249  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
1250  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1251  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1252
1253eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
1254  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
1255  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1256  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1257
1258eelf32ppcvxworks.c: $(srcdir)/emulparams/elf32ppcvxworks.sh \
1259  $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emulparams/vxworks.sh \
1260  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
1261  $(srcdir)/emultempl/vxworks.em \
1262  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1263
1264eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
1265  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1266
1267eelf32rl78.c: $(srcdir)/emulparams/elf32rl78.sh \
1268  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1269
1270eelf32rx.c: $(srcdir)/emulparams/elf32rx.sh \
1271  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1272
1273eelf32tilegx.c: $(srcdir)/emulparams/elf32tilegx.sh \
1274  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1275  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1276
1277eelf32tilegx_be.c: $(srcdir)/emulparams/elf32tilegx_be.sh \
1278  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1279  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1280
1281eelf32tilepro.c: $(srcdir)/emulparams/elf32tilepro.sh \
1282  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1283  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1284
1285eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
1286  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1287
1288eelf32visium.c: $(srcdir)/emulparams/elf32visium.sh \
1289  $(ELF_DEPS) $(srcdir)/scripttempl/visium.sc ${GEN_DEPENDS}
1290
1291eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
1292  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1293  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1294
1295eelf32xc16xl.c: $(srcdir)/emulparams/elf32xc16xl.sh \
1296  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1297  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1298
1299eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
1300  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1301  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1302
1303eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
1304  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1305  $(srcdir)/scripttempl/xstormy16.sc ${GEN_DEPENDS}
1306
1307eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
1308  $(srcdir)/emultempl/xtensaelf.em $(INCDIR)/xtensa-config.h \
1309  $(BFDDIR)/elf-bfd.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/xtensa.h \
1310  $(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
1311
1312eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
1313  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1314
1315eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
1316  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1317
1318eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
1319  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
1320
1321eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
1322  $(srcdir)/emulparams/elf_i386.sh \
1323  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1324
1325eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
1326  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1327
1328eelf_i386_nacl.c: $(srcdir)/emulparams/elf_i386_nacl.sh \
1329  $(srcdir)/emulparams/elf_i386.sh \
1330  $(srcdir)/emulparams/elf_nacl.sh \
1331  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1332
1333eelf_i386_sol2.c: $(srcdir)/emulparams/elf_i386_sol2.sh \
1334  $(srcdir)/emulparams/solaris2.sh \
1335  $(srcdir)/emultempl/solaris2.em \
1336  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1337
1338eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
1339  $(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
1340  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1341
1342eelf_iamcu.c: $(srcdir)/emulparams/elf_iamcu.sh \
1343  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1344
1345eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
1346  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1347
1348egld960.c: $(srcdir)/emulparams/gld960.sh \
1349  $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
1350
1351egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
1352  $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
1353
1354eh8300.c: $(srcdir)/emulparams/h8300.sh \
1355  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
1356
1357eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
1358  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1359
1360eh8300elf_linux.c: $(srcdir)/emulparams/h8300elf_linux.sh \
1361  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1362
1363eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
1364  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
1365
1366eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
1367  $(srcdir)/emulparams/h8300elf.sh \
1368  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1369
1370eh8300helf_linux.c: $(srcdir)/emulparams/h8300helf_linux.sh \
1371  $(srcdir)/emulparams/h8300elf_linux.sh \
1372  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1373
1374eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \
1375  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300hn.sc ${GEN_DEPENDS}
1376
1377eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
1378  $(srcdir)/emulparams/h8300elf.sh \
1379  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1380
1381eh8300s.c: $(srcdir)/emulparams/h8300s.sh \
1382  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
1383
1384eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
1385  $(srcdir)/emulparams/h8300elf.sh \
1386  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1387
1388eh8300self_linux.c: $(srcdir)/emulparams/h8300self_linux.sh \
1389  $(srcdir)/emulparams/h8300elf.sh \
1390  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1391
1392eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \
1393  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS}
1394
1395eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
1396  $(srcdir)/emulparams/h8300elf.sh \
1397  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1398
1399eh8300sx.c: $(srcdir)/emulparams/h8300sx.sh \
1400  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sx.sc ${GEN_DEPENDS}
1401
1402eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
1403  $(srcdir)/emulparams/h8300elf.sh \
1404  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1405
1406eh8300sxelf_linux.c: $(srcdir)/emulparams/h8300sxelf_linux.sh \
1407  $(srcdir)/emulparams/h8300elf.sh \
1408  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1409
1410eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \
1411  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS}
1412
1413eh8300sxnelf.c: $(srcdir)/emulparams/h8300sxnelf.sh \
1414  $(srcdir)/emulparams/h8300elf.sh \
1415  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1416
1417eh8500.c: $(srcdir)/emulparams/h8500.sh \
1418  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
1419
1420eh8500b.c: $(srcdir)/emulparams/h8500b.sh \
1421  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
1422
1423eh8500c.c: $(srcdir)/emulparams/h8500c.sh \
1424  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
1425
1426eh8500m.c: $(srcdir)/emulparams/h8500m.sh \
1427  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
1428
1429eh8500s.c: $(srcdir)/emulparams/h8500s.sh \
1430  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
1431
1432ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
1433  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1434
1435ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
1436  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1437
1438ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
1439  $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
1440  $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
1441
1442ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
1443  $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
1444  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1445
1446ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
1447  $(srcdir)/emulparams/hppaelf.sh \
1448  $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
1449  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1450
1451ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
1452  $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
1453  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1454
1455ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
1456  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1457
1458ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
1459  $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
1460
1461ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
1462  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1463
1464ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
1465  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
1466
1467ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
1468  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
1469
1470ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
1471  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1472
1473ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
1474  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1475
1476ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
1477  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1478
1479ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
1480  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1481
1482ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
1483  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
1484
1485ei386nbsd.c:	$(srcdir)/emulparams/i386nbsd.sh \
1486  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1487
1488ei386nto.c:	$(srcdir)/emulparams/i386nto.sh \
1489  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1490
1491ei386nw.c:	$(srcdir)/emulparams/i386nw.sh \
1492  $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
1493
1494ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
1495  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
1496
1497ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
1498  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
1499
1500ei386pep.c: $(srcdir)/emulparams/i386pep.sh \
1501  $(srcdir)/emultempl/pep.em $(srcdir)/scripttempl/pep.sc ${GEN_DEPENDS}
1502
1503elnk960.c: $(srcdir)/emulparams/lnk960.sh \
1504  $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
1505
1506em32relf.c: $(srcdir)/emulparams/m32relf.sh \
1507  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1508
1509em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
1510  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1511
1512em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
1513  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1514
1515em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
1516  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1517
1518em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
1519  $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
1520  $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
1521
1522em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
1523  $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
1524  $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
1525
1526em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
1527  $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
1528  $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
1529
1530em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
1531  $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
1532  $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
1533
1534em68k4knbsd.c:	$(srcdir)/emulparams/m68k4knbsd.sh \
1535  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1536
1537em68kaout.c: $(srcdir)/emulparams/m68kaout.sh \
1538  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1539
1540em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \
1541  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS}
1542
1543em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
1544  $(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
1545
1546em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
1547  $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
1548  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1549
1550em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
1551  $(srcdir)/emulparams/m68kelf.sh \
1552  $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
1553  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1554
1555em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
1556  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1557
1558em68knbsd.c:	$(srcdir)/emulparams/m68knbsd.sh \
1559  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1560
1561em68kpsos.c:	$(srcdir)/emulparams/m68kpsos.sh \
1562  $(ELF_DEPS) $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
1563
1564em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
1565  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
1566
1567emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
1568  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
1569
1570emn10200.c: $(srcdir)/emulparams/mn10200.sh \
1571  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1572
1573emn10300.c: $(srcdir)/emulparams/mn10300.sh \
1574  $(srcdir)/emulparams/mn10200.sh \
1575  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1576
1577emsp430elf.c: $(srcdir)/emulparams/msp430elf.sh \
1578  $(ELF_DEPS) $(srcdir)/emultempl/msp430.em \
1579  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc ${GEN_DEPENDS}
1580
1581emsp430X.c: $(srcdir)/emulparams/msp430elf.sh $(srcdir)/emulparams/msp430X.sh \
1582  $(ELF_DEPS) $(srcdir)/emultempl/msp430.em \
1583  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc ${GEN_DEPENDS}
1584
1585ends32elf.c: $(srcdir)/emulparams/nds32elf.sh \
1586  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
1587  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
1588
1589ends32elf16m.c: $(srcdir)/emulparams/nds32elf16m.sh \
1590  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
1591  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
1592
1593ends32belf.c: $(srcdir)/emulparams/nds32belf.sh \
1594  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
1595  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
1596
1597ends32belf16m.c: $(srcdir)/emulparams/nds32belf16m.sh \
1598  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
1599  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
1600
1601ends32elf_linux.c: $(srcdir)/emulparams/nds32elf_linux.sh \
1602  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
1603  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
1604
1605ends32belf_linux.c: $(srcdir)/emulparams/nds32belf_linux.sh \
1606  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
1607  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
1608
1609enews.c: $(srcdir)/emulparams/news.sh \
1610  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1611
1612enios2elf.c: $(srcdir)/emulparams/nios2elf.sh \
1613  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/nios2elf.em \
1614  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1615
1616enios2linux.c: $(srcdir)/emulparams/nios2linux.sh \
1617  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/nios2elf.em \
1618  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1619
1620ens32knbsd.c:	$(srcdir)/emulparams/ns32knbsd.sh \
1621  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/netbsd.em \
1622  $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1623
1624eaarch64elf.c: $(srcdir)/emulparams/aarch64elf.sh \
1625  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1626  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1627
1628eaarch64elf32.c: $(srcdir)/emulparams/aarch64elf32.sh \
1629  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1630  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1631
1632eaarch64elfb.c: $(srcdir)/emulparams/aarch64elfb.sh $(srcdir)/emulparams/aarch64elf.sh \
1633  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1634  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1635
1636eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aarch64elf32.sh \
1637  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1638  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1639
1640eaarch64cloudabi.c: $(srcdir)/emulparams/aarch64cloudabi.sh \
1641  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1642  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1643
1644eaarch64cloudabib.c: $(srcdir)/emulparams/aarch64cloudabib.sh $(srcdir)/emulparams/aarch64cloudabi.sh \
1645  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1646  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1647
1648eaarch64fbsd.c: $(srcdir)/emulparams/aarch64fbsd.sh \
1649  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1650  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1651
1652eaarch64fbsdb.c: $(srcdir)/emulparams/aarch64fbsdb.sh $(srcdir)/emulparams/aarch64fbsd.sh \
1653  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1654  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1655
1656eaarch64linux.c: $(srcdir)/emulparams/aarch64linux.sh \
1657  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1658  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1659
1660eaarch64linuxb.c: $(srcdir)/emulparams/aarch64linuxb.sh $(srcdir)/emulparams/aarch64linux.sh \
1661  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1662  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1663
1664eaarch64linux32.c: $(srcdir)/emulparams/aarch64linux32.sh \
1665  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1666  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1667
1668eaarch64linux32b.c: $(srcdir)/emulparams/aarch64linux32b.sh $(srcdir)/emulparams/aarch64linux32.sh \
1669  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1670  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1671
1672epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
1673  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1674
1675epdp11.c: $(srcdir)/emulparams/pdp11.sh \
1676  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1677
1678epjelf.c: $(srcdir)/emulparams/pjelf.sh \
1679  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1680
1681epjlelf.c: $(srcdir)/emulparams/pjlelf.sh $(srcdir)/emulparams/pjelf.sh \
1682  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1683
1684eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \
1685  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1686
1687eppcmacos.c:	$(srcdir)/emulparams/ppcmacos.sh \
1688  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
1689
1690eppcnw.c:	$(srcdir)/emulparams/ppcnw.sh \
1691  $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
1692
1693eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
1694  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
1695
1696eriscix.c: $(srcdir)/emulparams/riscix.sh \
1697  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1698
1699escore3_elf.c: $(srcdir)/emulparams/score3_elf.sh \
1700  $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
1701  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1702
1703escore7_elf.c: $(srcdir)/emulparams/score3_elf.sh \
1704  $(srcdir)/emulparams/score7_elf.sh \
1705  $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
1706  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1707
1708esh.c: $(srcdir)/emulparams/sh.sh \
1709  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
1710
1711eshelf.c: $(srcdir)/emulparams/shelf.sh \
1712  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1713
1714eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
1715  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1716  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1717  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1718
1719eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
1720  $(srcdir)/emulparams/shelf32.sh \
1721  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1722  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1723  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1724
1725eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
1726  $(srcdir)/emulparams/shelf32.sh \
1727  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1728  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1729  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1730
1731eshelf_fd.c: $(srcdir)/emulparams/shelf_fd.sh \
1732  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1733
1734eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
1735  $(srcdir)/emulparams/shlelf_linux.sh \
1736  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1737
1738eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
1739  $(srcdir)/emulparams/shelf.sh \
1740  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1741
1742eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
1743  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1744
1745eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
1746  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1747
1748eshelf_vxworks.c: $(srcdir)/emulparams/shelf_vxworks.sh \
1749  $(srcdir)/emulparams/vxworks.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc \
1750  $(srcdir)/emultempl/vxworks.em ${GEN_DEPENDS}
1751
1752eshl.c: $(srcdir)/emulparams/shl.sh \
1753  $(srcdir)/emulparams/sh.sh \
1754  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
1755
1756eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
1757  $(srcdir)/emulparams/shelf.sh \
1758  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1759
1760eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
1761  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
1762  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1763  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1764
1765eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
1766  $(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
1767  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1768  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1769  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1770
1771eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
1772  $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
1773  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
1774  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
1775  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1776
1777eshlelf_fd.c: $(srcdir)/emulparams/shlelf_fd.sh \
1778  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1779
1780eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
1781  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1782
1783eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
1784  $(srcdir)/emulparams/shelf_nbsd.sh \
1785  $(srcdir)/emulparams/shelf.sh \
1786  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1787
1788eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
1789  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1790
1791eshlelf_vxworks.c: $(srcdir)/emulparams/shlelf_vxworks.sh \
1792  $(srcdir)/emulparams/shelf_vxworks.sh $(srcdir)/emulparams/vxworks.sh \
1793  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
1794  ${GEN_DEPENDS}
1795
1796eshlsymbian.c: $(srcdir)/emulparams/shlsymbian.sh \
1797  $(srcdir)/emulparams/shelf.sh \
1798  $(ELF_DEPS) $(srcdir)/scripttempl/elf32sh-symbian.sc ${GEN_DEPENDS}
1799
1800eshpe.c: $(srcdir)/emulparams/shpe.sh \
1801  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
1802
1803esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
1804  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1805
1806esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
1807  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1808
1809esparcnbsd.c:	$(srcdir)/emulparams/sparcnbsd.sh \
1810  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1811
1812est2000.c: $(srcdir)/emulparams/st2000.sh \
1813  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS}
1814
1815esun3.c: $(srcdir)/emulparams/sun3.sh \
1816  $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1817
1818esun4.c: $(srcdir)/emulparams/sun4.sh \
1819  $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1820
1821etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
1822  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
1823
1824etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
1825  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
1826
1827etic3xcoff.c: $(srcdir)/emulparams/tic3xcoff.sh \
1828  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
1829
1830etic3xcoff_onchip.c: $(srcdir)/emulparams/tic3xcoff_onchip.sh \
1831  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
1832
1833etic4xcoff.c: $(srcdir)/emulparams/tic4xcoff.sh \
1834  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
1835
1836etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \
1837  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS}
1838
1839etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
1840  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
1841
1842ev850.c: $(srcdir)/emulparams/v850.sh $(srcdir)/emultempl/v850elf.em \
1843  $(ELF_DEPS) $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
1844
1845ev850_rh850.c: $(srcdir)/emulparams/v850_rh850.sh $(srcdir)/emultempl/v850elf.em \
1846  $(ELF_DEPS) $(srcdir)/scripttempl/v850_rh850.sc ${GEN_DEPENDS}
1847
1848evanilla.c: $(srcdir)/emulparams/vanilla.sh \
1849  $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
1850
1851evax.c: $(srcdir)/emulparams/vax.sh \
1852  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1853
1854evaxnbsd.c: $(srcdir)/emulparams/vaxnbsd.sh \
1855  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1856
1857evsta.c: $(srcdir)/emulparams/vsta.sh \
1858  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
1859
1860ew65.c: $(srcdir)/emulparams/w65.sh \
1861  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
1862
1863exgateelf.c: $(srcdir)/emulparams/xgateelf.sh \
1864  $(srcdir)/emultempl/generic.em $(ELF_DEPS) \
1865  $(srcdir)/scripttempl/elfxgate.sc ${GEN_DEPENDS}
1866
1867ez80.c: $(srcdir)/emulparams/z80.sh \
1868  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/z80.em \
1869  $(srcdir)/scripttempl/z80.sc ${GEN_DEPENDS}
1870
1871ez8001.c: $(srcdir)/emulparams/z8001.sh \
1872  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
1873
1874ez8002.c: $(srcdir)/emulparams/z8002.sh \
1875  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
1876
1877eelf32_x86_64.c: $(srcdir)/emulparams/elf32_x86_64.sh \
1878  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1879
1880eelf32_x86_64_nacl.c: $(srcdir)/emulparams/elf32_x86_64_nacl.sh \
1881  $(srcdir)/emulparams/elf32_x86_64.sh \
1882  $(srcdir)/emulparams/elf_nacl.sh \
1883  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1884
1885eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
1886  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1887
1888eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
1889  $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
1890  $(srcdir)/emultempl/needrelax.em \
1891  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1892
1893eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
1894  $(srcdir)/emulparams/elf64_ia64.sh \
1895  $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
1896  $(srcdir)/emultempl/needrelax.em \
1897  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1898
1899eelf64_ia64_vms.c: $(srcdir)/emulparams/elf64_ia64_vms.sh \
1900  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/vms.em \
1901  $(srcdir)/emultempl/needrelax.em \
1902  $(srcdir)/scripttempl/ia64vms.sc ${GEN_DEPENDS}
1903
1904eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
1905  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1906
1907eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
1908  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1909
1910eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
1911  $(srcdir)/emulparams/elf64_sparc.sh \
1912  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1913
1914eelf64_sparc_sol2.c: $(srcdir)/emulparams/elf64_sparc_sol2.sh \
1915  $(srcdir)/emulparams/elf64_sparc.sh \
1916  $(srcdir)/emulparams/solaris2.sh \
1917  $(srcdir)/emultempl/solaris2.em \
1918  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1919
1920eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
1921  $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
1922  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1923
1924eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
1925  $(srcdir)/emulparams/elf64alpha.sh \
1926  $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
1927  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1928
1929eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
1930  $(srcdir)/emulparams/elf64alpha.sh \
1931  $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
1932  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1933
1934eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
1935  $(srcdir)/emulparams/elf64bmip-defs.sh \
1936  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1937  $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
1938  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1939
1940eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
1941  $(srcdir)/emulparams/elf64bmip-defs.sh \
1942  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1943  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1944
1945eelf64btsmip_fbsd.c: $(srcdir)/emulparams/elf64btsmip_fbsd.sh \
1946  $(srcdir)/emulparams/elf64bmip-defs.sh \
1947  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1948  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1949
1950eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
1951  $(ELF_DEPS) $(srcdir)/scripttempl/elf64hppa.sc ${GEN_DEPENDS}
1952
1953eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
1954  $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
1955  ldemul-list.h \
1956  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1957
1958eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
1959  $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
1960  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1961  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1962
1963eelf64ltsmip_fbsd.c: $(srcdir)/emulparams/elf64ltsmip_fbsd.sh \
1964  $(srcdir)/emulparams/elf64btsmip_fbsd.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
1965  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
1966  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1967
1968eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
1969  $(ELF_DEPS) $(srcdir)/emultempl/mmix-elfnmmo.em \
1970  $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1971
1972eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
1973  ldemul-list.h \
1974  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1975
1976eelf64ppc_fbsd.c: $(srcdir)/emulparams/elf64ppc_fbsd.sh \
1977  $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \
1978  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1979
1980eelf64rdos.c: $(srcdir)/emulparams/elf64rdos.sh \
1981  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1982
1983eelf64tilegx.c: $(srcdir)/emulparams/elf64tilegx.sh \
1984  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1985  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1986
1987eelf64tilegx_be.c: $(srcdir)/emulparams/elf64tilegx_be.sh \
1988  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
1989  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1990
1991eelf_l1om.c: $(srcdir)/emulparams/elf_l1om.sh \
1992  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1993
1994eelf_l1om_fbsd.c: $(srcdir)/emulparams/elf_l1om_fbsd.sh \
1995  $(srcdir)/emulparams/elf_l1om.sh \
1996  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1997
1998eelf_k1om.c: $(srcdir)/emulparams/elf_k1om.sh \
1999  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2000
2001eelf_k1om_fbsd.c: $(srcdir)/emulparams/elf_k1om_fbsd.sh \
2002  $(srcdir)/emulparams/elf_k1om.sh \
2003  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2004
2005eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
2006  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2007
2008eelf_x86_64_cloudabi.c: $(srcdir)/emulparams/elf_x86_64_cloudabi.sh \
2009  $(srcdir)/emulparams/elf_x86_64.sh \
2010  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2011
2012eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
2013  $(srcdir)/emulparams/elf_x86_64.sh \
2014  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2015
2016eelf_x86_64_nacl.c: $(srcdir)/emulparams/elf_x86_64_nacl.sh \
2017  $(srcdir)/emulparams/elf_x86_64.sh \
2018  $(srcdir)/emulparams/elf_nacl.sh \
2019  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2020
2021eelf_x86_64_sol2.c: $(srcdir)/emulparams/elf_x86_64_sol2.sh \
2022  $(srcdir)/emulparams/elf_x86_64.sh \
2023  $(srcdir)/emulparams/solaris2.sh \
2024  $(srcdir)/emultempl/solaris2.em \
2025  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2026
2027ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
2028  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2029
2030emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
2031  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em \
2032  $(srcdir)/emultempl/mmo.em $(srcdir)/scripttempl/DWARF.sc \
2033  $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
2034
2035eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
2036  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2037
2038eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
2039  $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
2040  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2041
2042eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
2043  $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
2044  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2045
2046eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
2047  $(srcdir)/emulparams/shelf64_nbsd.sh \
2048  $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
2049  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2050
2051
2052# We need this for automake to use YLWRAP.
2053EXTRA_ld_new_SOURCES = deffilep.y ldlex.l
2054# Allow dependency tracking to work for these files, too.
2055EXTRA_ld_new_SOURCES += pep-dll.c pe-dll.c
2056
2057ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
2058	ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c $(PLUGIN_C) \
2059	ldbuildid.c
2060ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) \
2061		      $(BFDLIB) $(LIBIBERTY) $(LIBINTL_DEP)
2062ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
2063
2064# Dependency tracking for the generated emulation files.
2065EXTRA_ld_new_SOURCES += $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
2066
2067# This is the real libbfd.a created by libtool.
2068TESTBFDLIB = @TESTBFDLIB@
2069
2070check-DEJAGNU: site.exp
2071	srcroot=`cd $(srcdir) && pwd`; export srcroot; \
2072	r=`pwd`; export r; \
2073	LC_ALL=C; export LC_ALL; \
2074	EXPECT=$(EXPECT); export EXPECT; \
2075	runtest=$(RUNTEST); \
2076	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
2077	  $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
2078		CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
2079		CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
2080		CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
2081		OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
2082		LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
2083		DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \
2084		$(RUNTESTFLAGS); \
2085	else echo "WARNING: could not find \`runtest'" 1>&2; :;\
2086	fi
2087
2088# Rules for testing by relinking ld itself.
2089# A similar test is in the testsuite.  This target is for ease of use
2090# when porting ld.
2091
2092ld-partial.@OBJEXT@: ld-new$(EXEEXT)
2093	./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.@OBJEXT@ -r $(OFILES)
2094ld1$(EXEEXT): ld-partial.@OBJEXT@
2095	./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.@OBJEXT@ $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
2096
2097ld1-full$(EXEEXT): ld-new
2098	./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
2099
2100ld2$(EXEEXT): ld1$(EXEEXT)
2101	./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
2102
2103ld3$(EXEEXT): ld2$(EXEEXT)
2104	./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
2105
2106bootstrap: ld3$(EXEEXT)
2107	cmp ld2$(EXEEXT) ld3$(EXEEXT)
2108
2109.PHONY: bootstrap
2110
2111# A test program for C++ constructors and destructors.
2112# This test is now in the testsuite.
2113#
2114#cdtest: cdtest-main.@OBJEXT@ cdtest-bar.@OBJEXT@ cdtest-foo.@OBJEXT@ ld.new
2115#	./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
2116#	  cdtest-main.@OBJEXT@ cdtest-bar.@OBJEXT@ cdtest-foo.@OBJEXT@ $(HOSTING_LIBS)
2117#
2118#cdtest.out: cdtest
2119#	./cdtest > cdtest.tmp
2120#	mv cdtest.tmp cdtest.out
2121#
2122#cdtest-ur.@OBJEXT@: cdtest-main.@OBJEXT@ cdtest-bar.@OBJEXT@ cdtest-foo.@OBJEXT@ ld.new
2123#	./ld.new $(HOSTING_EMU) -o cdtest-ur.@OBJEXT@ -Ur cdtest-main.@OBJEXT@ \
2124#	  cdtest-bar.@OBJEXT@ cdtest-foo.@OBJEXT@
2125#
2126#cdtest-ur: cdtest-ur.@OBJEXT@
2127#	./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.@OBJEXT@ \
2128#	  $(HOSTING_LIBS)
2129#
2130#cdtest-ur.out: cdtest-ur
2131#	./cdtest-ur > cdtest-ur.tmp
2132#	mv cdtest-ur.tmp cdtest-ur.out
2133#
2134#check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
2135#	diff $(srcdir)/cdtest.exp cdtest.out
2136#	diff $(srcdir)/cdtest.exp cdtest-ur.out
2137#
2138#.PHONY: check-cdtest
2139
2140# END OF CHECK TARGETS
2141
2142#
2143# Build a dummy plugin using libtool.
2144#
2145if ENABLE_PLUGINS
2146noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
2147		     libldtestplug3.la libldtestplug4.la
2148libldtestplug_la_SOURCES = testplug.c
2149libldtestplug_la_CFLAGS= -g -O2
2150libldtestplug_la_LDFLAGS = -no-undefined -rpath /nowhere
2151libldtestplug2_la_SOURCES = testplug2.c
2152libldtestplug2_la_CFLAGS= -g -O2
2153libldtestplug2_la_LDFLAGS = -no-undefined -rpath /nowhere
2154libldtestplug3_la_SOURCES = testplug3.c
2155libldtestplug3_la_CFLAGS= -g -O2
2156libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
2157libldtestplug4_la_SOURCES = testplug4.c
2158libldtestplug4_la_CFLAGS= -g -O2
2159libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
2160endif
2161
2162# DOCUMENTATION TARGETS
2163# Manual configuration file; not usually attached to normal configuration,
2164# because almost all configs use "gen" version of manual.
2165#  Set DOCVER above to change.
2166configdoc.texi:	${DOCVER}-doc.texi
2167	cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
2168	chmod u+w ./configdoc.texi
2169
2170# Build the man page from the texinfo file
2171# The sed command removes the no-adjust Nroff command so that
2172# the man output looks standard.
2173ld.1: $(srcdir)/ld.texinfo configdoc.texi
2174	touch $@
2175	-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
2176	-($(POD2MAN) ld.pod | \
2177		sed -e '/^.if n .na/d' > $@.T$$$$ && \
2178		mv -f $@.T$$$$ $@) || \
2179		(rm -f $@.T$$$$ && exit 1)
2180	rm -f ld.pod
2181
2182MAINTAINERCLEANFILES = configdoc.texi ld.1
2183
2184# We want to reconfigure if configure.host or configure.tgt changes.
2185# development.sh is used to determine -Werror default.
2186CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \
2187	$(BFDDIR)/development.sh
2188
2189MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
2190	ldemul-list.h crtbegin.@OBJEXT@ crtend.@OBJEXT@ ld.log ld.sum
2191mostlyclean-local:
2192	-rm -rf tmpdir
2193CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s spu_ovl.@OBJEXT@ spu_icache.s spu_icache.@OBJEXT@
2194
2195.PHONY: install-exec-local install-data-local
2196
2197install-exec-local: ld-new$(EXEEXT) install-binPROGRAMS
2198	$(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
2199	n=`echo $(installed_linker) | sed '$(transform)'`; \
2200	if test "$(bindir)" != "$(tooldir)/bin"; then \
2201	  rm -f $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
2202	  ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT) >/dev/null 2>/dev/null \
2203	  || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
2204	fi; \
2205	if test "x$(install_as_default)" = "xyes"; then \
2206	  ld=`echo ld | sed '$(transform)'`; \
2207	  rm -f $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
2208	  ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT) >/dev/null 2>/dev/null \
2209	  || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
2210	  if test "$(bindir)" != "$(tooldir)/bin"; then \
2211	    rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
2212	    ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
2213	    || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
2214	  fi; \
2215	fi
2216
2217install-data-local:
2218	$(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
2219	for f in ldscripts/* ; do \
2220	  $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
2221	done
2222
2223# Stuff that should be included in a distribution.  The diststuff
2224# target is run by the taz target in ../Makefile.in.
2225EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.@OBJEXT@_c \
2226	     emultempl/spu_icache.@OBJEXT@_c deffilep.c deffilep.h $(man_MANS)
2227diststuff: info $(EXTRA_DIST)
2228
2229# Both info (ld.info) and ld.1 depend on configdoc.texi.
2230# But info isn't a direct target. Make info-recursive to depend on
2231# ld.1 to support parallel build.
2232info-recursive: ld.1
2233
2234DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
2235distclean-local:
2236	rm -rf ldscripts
2237
2238MAINTAINERCLEANFILES += ld.info
2239
2240# Automake 1.9 will only build info files in the objdir if they are
2241# mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
2242# though, so we use a bogus condition.
2243if GENINSRC_NEVER
2244DISTCLEANFILES += ld.info
2245endif
2246