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