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