]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/Makefile.am
remove extraneous period
[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
RH
15
16# We put the scripts in the directory $(scriptdir)/ldscripts.
17# We can't put the scripts in $(datadir) because the SEARCH_DIR
18# directives need to be different for native and cross linkers.
19scriptdir = $(tooldir)/lib
20
21EMUL = @EMUL@
22EMULATION_OFILES = @EMULATION_OFILES@
23EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
24
25# Search path to override the default search path for -lfoo libraries.
26# If LIB_PATH is empty, the ones in the script (if any) are left alone.
27# (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
28# a cross-linker, in which case the default is empty. See genscripts.sh.)
29# Otherwise, they are replaced with the ones given in LIB_PATH,
30# which may have the form: LIB_PATH=/lib:/usr/local/lib
31LIB_PATH =
32
33BASEDIR = $(srcdir)/..
34BFDDIR = $(BASEDIR)/bfd
35INCDIR = $(BASEDIR)/include
f4162f5c 36MKDEP = mkdep
252b5132
RH
37
38# What version of the manual to build
39DOCVER = gen
40
41#stuff for self hosting (can be overridden in config file).
42HOSTING_CRT0 = @HOSTING_CRT0@
43HOSTING_LIBS = @HOSTING_LIBS@
44HOSTING_EMU = -m $(EMUL)
45
46# Setup the testing framework, if you have one
47EXPECT = `if [ -f $$r/../expect/expect ] ; \
48 then echo $$r/../expect/expect ; \
49 else echo expect ; fi`
50
51RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
52 then echo $${srcroot}/../dejagnu/runtest ; \
53 else echo runtest ; fi`
54
55RUNTESTFLAGS =
56
57CC_FOR_TARGET = ` \
58 if [ -f $$r/../gcc/xgcc ] ; then \
59 if [ -f $$r/../newlib/Makefile ] ; then \
60 echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
61 else \
62 echo $$r/../gcc/xgcc -B$$r/../gcc/; \
63 fi; \
64 else \
65 if [ "@host@" = "@target@" ] ; then \
66 echo $(CC); \
67 else \
68 echo gcc | sed '$(transform)'; \
69 fi; \
70 fi`
71
72CXX = gcc
73CXX_FOR_TARGET = ` \
74 if [ -f $$r/../gcc/xgcc ] ; then \
75 if [ -f $$r/../newlib/Makefile ] ; then \
76 echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
77 else \
78 echo $$r/../gcc/xgcc -B$$r/../gcc/; \
79 fi; \
80 else \
81 if [ "@host@" = "@target@" ] ; then \
82 echo $(CXX); \
83 else \
84 echo gcc | sed '$(transform)'; \
85 fi; \
86 fi`
87
88noinst_PROGRAMS = ld-new
89info_TEXINFOS = ld.texinfo
90noinst_TEXINFOS = ldint.texinfo
91man_MANS = ld.1
92
93INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
94
95BFDLIB = ../bfd/libbfd.la
96LIBIBERTY = ../libiberty/libiberty.a
97
98ALL_EMULATIONS = \
99 ea29k.o \
100 eaixppc.o \
101 eaixrs6.o \
102 ealpha.o \
103 earcelf.o \
104 earmelf.o \
105 earmelf_oabi.o \
3699964a
AS
106 earmelf_linux.o \
107 earmelf_linux26.o \
252b5132
RH
108 earmaoutb.o \
109 earmaoutl.o \
110 earmcoff.o \
8959586a 111 earmnbsd.o \
252b5132
RH
112 earmpe.o \
113 ecoff_sparc.o \
114 ed10velf.o \
115 ed30velf.o \
116 ed30v_e.o \
117 ed30v_o.o \
118 edelta68.o \
119 eebmon29k.o \
120 eelf32_sparc.o \
0ccf812a 121 eelf32_i960.o \
252b5132
RH
122 eelf32b4300.o \
123 eelf32bmip.o \
124 eelf32ebmip.o \
125 eelf32elmip.o \
dc831978 126 eelf32bmipn32.o \
252b5132
RH
127 eelf32l4300.o \
128 eelf32lmip.o \
129 eelf32lppc.o \
130 eelf32ppc.o \
ec2f040d 131 eelf32ppclinux.o \
252b5132
RH
132 eelf_i386.o \
133 eelf_i386_be.o \
134 egld960.o \
135 egld960coff.o \
136 eelf32fr30.o \
71acc4e8 137 eelf32mcore.o \
252b5132
RH
138 eh8300.o \
139 eh8300h.o \
140 eh8300s.o \
141 eh8500.o \
142 eh8500b.o \
143 eh8500c.o \
144 eh8500m.o \
145 eh8500s.o \
146 ehp300bsd.o \
147 ehp3hpux.o \
148 ehppaelf.o \
149 ei386aout.o \
150 ei386beos.o \
151 ei386bsd.o \
152 ei386coff.o \
153 ei386go32.o \
154 ei386linux.o \
155 ei386lynx.o \
156 ei386mach.o \
157 ei386moss.o \
158 ei386msdos.o \
159 ei386nbsd.o \
160 ei386nw.o \
161 ei386pe.o \
a7e78dae 162 ei386pe_posix.o \
252b5132
RH
163 elnk960.o \
164 em68k4knbsd.o \
165 em68kaout.o \
166 em68kaux.o \
167 em68kcoff.o \
168 em68kelf.o \
169 em68klinux.o \
170 em68klynx.o \
171 em68knbsd.o \
172 em68kpsos.o \
173 em88kbcs.o \
71acc4e8 174 emcorepe.o \
252b5132
RH
175 emipsbig.o \
176 emipsbsd.o \
177 emipsidt.o \
178 emipsidtl.o \
179 emipslit.o \
180 emipslnews.o \
181 enews.o \
182 ens32knbsd.o \
183 epc532macha.o \
184 eppcmacos.o \
185 eppcnw.o \
186 eppcpe.o \
187 eriscix.o \
188 esa29200.o \
189 esh.o \
190 eshelf.o \
191 eshlelf.o \
192 eshl.o \
193 esparcaout.o \
194 esparclinux.o \
195 esparclynx.o \
196 esparcnbsd.o \
197 est2000.o \
198 esun3.o \
199 esun4.o \
200 etic30aout.o \
201 etic30coff.o \
202 etic80coff.o \
203 evanilla.o \
204 evax.o \
205 evsta.o \
206 ew65.o \
207 ez8001.o \
208 ez8002.o
209
210ALL_64_EMULATIONS = \
211 eelf64_sparc.o \
22c675a7 212 eelf64alpha.o \
f6e143a1
JL
213 eelf64bmip.o \
214 eelf64hppa.o
252b5132
RH
215
216ALL_EMUL_EXTRA_OFILES = \
217 pe-dll.o \
218 deffilep.o
219
220CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
221 ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
222 mri.c ldcref.c pe-dll.c
223
224HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
225 ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
226 ldwrite.h mri.h deffile.h
227
228GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
229GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
230
231OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
232 ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
233 ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
234
235STAGESTUFF = *.o ldscripts/* e*.c
236
237# At the moment this is just a list of those emulation template files
238# that contain internationalised strings.
239EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
240
241POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
242
243po/POTFILES.in: @MAINT@ Makefile
244 for file in $(POTFILES); do echo $$file; done | sort > tmp \
245 && mv tmp $(srcdir)/po/POTFILES.in
246
247ldmain.o: ldmain.c config.status
248 $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
249
250ldemul-list.h: Makefile
251 (echo "/* This file is automatically generated. DO NOT EDIT! */";\
252 for f in `echo " " ${EMULATION_OFILES} "" \
253 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
254 echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
255 done;\
256 echo "";\
257 echo "#define EMULATION_LIST \\";\
258 for f in `echo " " ${EMULATION_OFILES} "" \
259 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
260 echo " &ld_$${f}_emulation, \\"; \
261 done;\
262 echo " 0") >ldemul-tmp.h
263 mv ldemul-tmp.h ldemul-list.h
264
597e2591
ILT
265stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
266 cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
267
252b5132
RH
268# These all start with e so 'make clean' can find them.
269
3336653a 270GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
597e2591 271GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
252b5132
RH
272@TDIRS@
273
274ea29k.c: $(srcdir)/emulparams/a29k.sh \
275 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
276 ${GENSCRIPTS} a29k "$(tdir_a29k)"
277eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
278 $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
279 ${GENSCRIPTS} aixppc "$(tdir_aixppc)"
280eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
281 $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
282 ${GENSCRIPTS} aixrs6 "$(tdir_aixrs6)"
283ealpha.c: $(srcdir)/emulparams/alpha.sh \
284 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
285 ${GENSCRIPTS} alpha "$(tdir_alpha)"
286earcelf.c: $(srcdir)/emulparams/arcelf.sh \
287 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
288 ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
289earmelf.c: $(srcdir)/emulparams/armelf.sh \
290 $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
291 ${GENSCRIPTS} armelf "$(tdir_armelf)"
292earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
293 $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
294 ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
295earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
296 $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
297 ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
298earmelf_linux26.c: $(srcdir)/emulparams/armelf_linux26.sh \
299 $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
300 ${GENSCRIPTS} armelf_linux26 "$(tdir_armelf_linux26)"
301earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
302 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
303 ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
304earmaoutl.c: $(srcdir)/emulparams/armaoutl.sh \
305 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
306 ${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
307earmcoff.c: $(srcdir)/emulparams/armcoff.sh \
308 $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
309 ${GENSCRIPTS} armcoff "$(tdir_armcoff)"
8959586a
NC
310earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
311 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
312 ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
252b5132
RH
313earmpe.c: $(srcdir)/emulparams/armpe.sh \
314 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
315 ${GENSCRIPTS} armpe "$(tdir_armpe)"
316ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
317 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
318 ${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
319ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
320 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
321 ${GENSCRIPTS} d10velf "$(tdir_d10v)"
322ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
323 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
324 ${GENSCRIPTS} d30velf "$(tdir_d30v)"
325ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
326 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
327 ${GENSCRIPTS} d30v_o "$(tdir_d30v)"
328ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
329 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
330 ${GENSCRIPTS} d30v_e "$(tdir_d30v)"
331edelta68.c: $(srcdir)/emulparams/delta68.sh \
332 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
333 ${GENSCRIPTS} delta68 "$(tdir_delta68)"
334eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
335 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
336 ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
337eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
338 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
339 ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
71acc4e8
NC
340eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
341 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
342 ${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
252b5132
RH
343em32relf.c: $(srcdir)/emulparams/m32relf.sh \
344 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
345 ${GENSCRIPTS} m32relf "$(tdir_m32r)"
346eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
347 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
348 ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
0ccf812a
ILT
349eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
350 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
351 ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
252b5132
RH
352eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
353 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
354 ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
355eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
356 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
357 ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
358eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
359 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
360 ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
361eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
362 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
363 ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
364eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
365 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
366 ${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
dc831978
MM
367eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
368 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
369 ${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
252b5132
RH
370eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
371 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
372 ${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
373eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
374 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
375 ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
376eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
377 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
378 ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
379eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
380 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
381 ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
382eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
383 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
384 ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
ec2f040d
RH
385eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
386 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
387 ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
252b5132
RH
388eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
389 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
390 ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
f6e143a1
JL
391eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
392 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
393 ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
252b5132
RH
394eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
395 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
396 ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
22c675a7
MM
397eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
398 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
399 ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
252b5132
RH
400eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
401 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
402 ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
403eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
404 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
405 ${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
406egld960.c: $(srcdir)/emulparams/gld960.sh \
407 $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
408 ${GENSCRIPTS} gld960 "$(tdir_gld960)"
409egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
410 $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
411 ${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
252b5132
RH
412eh8300.c: $(srcdir)/emulparams/h8300.sh \
413 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
414 ${GENSCRIPTS} h8300 "$(tdir_h8300)"
415eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
416 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
417 ${GENSCRIPTS} h8300h "$(tdir_h8300h)"
418eh8300s.c: $(srcdir)/emulparams/h8300s.sh \
419 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
420 ${GENSCRIPTS} h8300s "$(tdir_h8300s)"
421eh8500.c: $(srcdir)/emulparams/h8500.sh \
422 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
423 ${GENSCRIPTS} h8500 "$(tdir_h8500)"
424eh8500b.c: $(srcdir)/emulparams/h8500b.sh \
425 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
426 ${GENSCRIPTS} h8500b "$(tdir_h8500b)"
427eh8500c.c: $(srcdir)/emulparams/h8500c.sh \
428 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
429 ${GENSCRIPTS} h8500c "$(tdir_h8500c)"
430eh8500m.c: $(srcdir)/emulparams/h8500m.sh \
431 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
432 ${GENSCRIPTS} h8500m "$(tdir_h8500m)"
433eh8500s.c: $(srcdir)/emulparams/h8500s.sh \
434 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
435 ${GENSCRIPTS} h8500s "$(tdir_h8500s)"
436ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
437 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
438 ${GENSCRIPTS} hp300bsd "$(tdir_hp300bsd)"
439ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
440 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
441 ${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
442ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
443 $(srcdir)/emultempl/hppaelf.em $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
444 ${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
445ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
446 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
447 ${GENSCRIPTS} i386aout "$(tdir_i386aout)"
448ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
449 $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
450 ${GENSCRIPTS} i386beos "$(tdir_i386beos)"
451ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
452 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
453 ${GENSCRIPTS} i386bsd "$(tdir_i386bsd)"
454ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
455 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
456 ${GENSCRIPTS} i386coff "$(tdir_i386coff)"
457ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
458 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
459 ${GENSCRIPTS} i386go32 "$(tdir_i386go32)"
460ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
461 $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
462 ${GENSCRIPTS} i386linux "$(tdir_i386linux)"
463ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
464 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
465 ${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
466ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
467 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
468 ${GENSCRIPTS} i386mach "$(tdir_i386mach)"
469ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
470 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
471 ${GENSCRIPTS} i386moss "$(tdir_i386moss)"
472ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
473 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
474 ${GENSCRIPTS} i386msdos "$(tdir_i386msdos)"
475ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
476 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
477 ${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
478ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
479 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
480 ${GENSCRIPTS} i386nw "$(tdir_i386nw)"
481ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
482 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
483 ${GENSCRIPTS} i386pe "$(tdir_i386pe)"
a7e78dae
ILT
484ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
485 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
486 ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
252b5132
RH
487elnk960.c: $(srcdir)/emulparams/lnk960.sh \
488 $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
489 ${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
490em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
491 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
492 ${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)"
493em68kaout.c: $(srcdir)/emulparams/m68kaout.sh \
494 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
495 ${GENSCRIPTS} m68kaout "$(tdir_m68kaout)"
496em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \
497 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS}
498 ${GENSCRIPTS} m68kaux "$(tdir_m68kaux)"
499em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
500 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
501 ${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
502em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
503 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
504 ${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
505em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
506 $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
507 ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
508em68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
509 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68klynx.sc ${GEN_DEPENDS}
510 ${GENSCRIPTS} m68klynx "$(tdir_m68klynx)"
511em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
512 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
513 ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
514em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
515 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
516 ${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
517em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
518 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
519 ${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
71acc4e8
NC
520emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
521 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
522 ${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
252b5132
RH
523emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \
524 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
525 ${GENSCRIPTS} mipsbig
526emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \
527 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
528 ${GENSCRIPTS} mipsbsd
529emipsidt.c: $(srcdir)/emulparams/mipsidt.sh \
530 $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
531 ${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
532emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
533 $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
534 ${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
535emipslit.c: $(srcdir)/emulparams/mipslit.sh \
536 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
537 ${GENSCRIPTS} mipslit "$(tdir_mipslit)"
538emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
539 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
540 ${GENSCRIPTS} mipslnews
541emn10300.c: $(srcdir)/emulparams/mn10300.sh \
542 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
543 ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
544emn10200.c: $(srcdir)/emulparams/mn10200.sh \
545 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
546 ${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
547enews.c: $(srcdir)/emulparams/news.sh \
548 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
549 ${GENSCRIPTS} news "$(tdir_news)"
550ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
551 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
552 ${GENSCRIPTS} ns32knbsd "$(tdir_ns32knbsd)"
553epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
554 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
555 ${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
556eppcmacos.c: $(srcdir)/emulparams/ppcmacos.sh \
557 $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
558 ${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
559eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \
560 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
561 ${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
562eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
563 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
564 ${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
565eriscix.c: $(srcdir)/emulparams/riscix.sh \
566 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
567 ${GENSCRIPTS} riscix "$(tdir_riscix)"
568esa29200.c: $(srcdir)/emulparams/sa29200.sh \
569 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
570 ${GENSCRIPTS} sa29200 "$(tdir_sa29200)"
571esh.c: $(srcdir)/emulparams/sh.sh \
572 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
573 ${GENSCRIPTS} sh "$(tdir_sh)"
574eshelf.c: $(srcdir)/emulparams/shelf.sh \
575 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
576 ${GENSCRIPTS} shelf "$(tdir_shelf)"
577eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
578 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
579 ${GENSCRIPTS} shlelf "$(tdir_shlelf)"
580eshl.c: $(srcdir)/emulparams/shl.sh \
581 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
582 ${GENSCRIPTS} shl "$(tdir_shl)"
583esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
584 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
585 ${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
586esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
587 $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
588 ${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
589esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
590 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
591 ${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
592esparcnbsd.c: $(srcdir)/emulparams/sparcnbsd.sh \
593 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
594 ${GENSCRIPTS} sparcnbsd "$(tdir_sparcnbsd)"
595est2000.c: $(srcdir)/emulparams/st2000.sh \
596 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS}
597 ${GENSCRIPTS} st2000 "$(tdir_st2000)"
598esun3.c: $(srcdir)/emulparams/sun3.sh \
599 $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
600 ${GENSCRIPTS} sun3 "$(tdir_sun3)"
601esun4.c: $(srcdir)/emulparams/sun4.sh \
602 $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
603 ${GENSCRIPTS} sun4 "$(tdir_sun4)"
604etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
605 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
606 ${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
607etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
608 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
609 ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
610etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
611 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
612 ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
613evanilla.c: $(srcdir)/emulparams/vanilla.sh \
614 $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
615 ${GENSCRIPTS} vanilla "$(tdir_vanilla)"
616evax.c: $(srcdir)/emulparams/vax.sh \
617 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
618 ${GENSCRIPTS} vax "$(tdir_vax)"
619evsta.c: $(srcdir)/emulparams/vsta.sh \
620 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
621 ${GENSCRIPTS} vsta "$(tdir_vsta)"
622ev850.c: $(srcdir)/emulparams/v850.sh \
623 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
624 ${GENSCRIPTS} v850 "$(tdir_v850)"
625ew65.c: $(srcdir)/emulparams/w65.sh \
626 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
627 ${GENSCRIPTS} w65 "$(tdir_w65)"
628ez8001.c: $(srcdir)/emulparams/z8001.sh \
629 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
630 ${GENSCRIPTS} z8001 "$(tdir_z8001)"
631ez8002.c: $(srcdir)/emulparams/z8002.sh \
632 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
633 ${GENSCRIPTS} z8002 "$(tdir_z8002)"
634
635ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
636 ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
637ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
638ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
639
640# The generated emulation files mostly have the same dependencies.
641$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
642 ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
643 ldctor.h ldexp.h ldlang.h ldgram.h
644
645# This is the real libbfd.a created by libtool.
646TESTBFDLIB = @TESTBFDLIB@
647
648check-DEJAGNU: site.exp
649 srcroot=`cd $(srcdir) && pwd`; export srcroot; \
650 r=`pwd`; export r; \
651 EXPECT=$(EXPECT); export EXPECT; \
652 if [ -f $(top_builddir)/../expect/expect ]; then \
653 TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
654 export TCL_LIBRARY; \
655 fi; \
656 runtest=$(RUNTEST); \
657 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
658 $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
659 CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
660 CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
661 CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
662 OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
663 LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" \
664 $(RUNTESTFLAGS); \
665 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
666 fi
667
668# Rules for testing by relinking ld itself.
669# A similar test is in the testsuite. This target is for ease of use
670# when porting ld.
671
672ld-partial.o: ld-new$(EXEEXT)
673 ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
674ld1$(EXEEXT): ld-partial.o
675 ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
676
677ld1-full$(EXEEXT): ld-new
678 ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
679
680ld2$(EXEEXT): ld1$(EXEEXT)
681 ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
682
683ld3$(EXEEXT): ld2$(EXEEXT)
684 ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
685
686bootstrap: ld3$(EXEEXT)
687 cmp ld2$(EXEEXT) ld3$(EXEEXT)
688
689.PHONY: bootstrap
690
691# A test program for C++ constructors and destructors.
692# This test is now in the testsuite.
693#
694#cdtest: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
695# ./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
696# cdtest-main.o cdtest-bar.o cdtest-foo.o $(HOSTING_LIBS)
697#
698#cdtest.out: cdtest
699# ./cdtest > cdtest.tmp
700# mv cdtest.tmp cdtest.out
701#
702#cdtest-ur.o: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
703# ./ld.new $(HOSTING_EMU) -o cdtest-ur.o -Ur cdtest-main.o \
704# cdtest-bar.o cdtest-foo.o
705#
706#cdtest-ur: cdtest-ur.o
707# ./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.o \
708# $(HOSTING_LIBS)
709#
710#cdtest-ur.out: cdtest-ur
711# ./cdtest-ur > cdtest-ur.tmp
712# mv cdtest-ur.tmp cdtest-ur.out
713#
714#check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
715# diff $(srcdir)/cdtest.exp cdtest.out
716# diff $(srcdir)/cdtest.exp cdtest-ur.out
717#
718#.PHONY: check-cdtest
719
720# END OF CHECK TARGETS
721
722# DOCUMENTATION TARGETS
723# Manual configuration file; not usually attached to normal configuration,
724# because almost all configs use "gen" version of manual.
725# Set DOCVER above to change.
726configdoc.texi: ${DOCVER}-doc.texi
727 ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
728 || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
729 || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
730
731ldver.texi: Makefile
732 rm -f $@
733 echo '@set VERSION $(VERSION)' > $@
734
735ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
736 @rm -f $@ $@-[0-9] $@-[0-9][0-9]
737 $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
738
739ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
740 TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
741 MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) $(srcdir)/ld.texinfo
742
743MAINTAINERCLEANFILES = ldver.texi
744
745# We want to reconfigure if configure.host or configure.tgt changes.
746config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
747 $(SHELL) ./config.status --recheck
748
749MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
750 ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
751mostlyclean-local:
752 -rm -rf tmpdir
f4162f5c 753CLEANFILES = dep.sed DEP DEP1
252b5132
RH
754
755.PHONY: install-exec-local install-data-local
756
757install-exec-local: ld-new$(EXEEXT)
758 $(mkinstalldirs) $(bindir) $(tooldir)/bin
759 @list='$(noinst_PROGRAMS)'; for p in $$list; do \
760 if test -f $$p; then \
761 echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
762 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
763 else :; fi; \
764 done
765 n=`echo ld | sed '$(transform)'`; \
766 if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
767 rm -f $(tooldir)/bin/ld$(EXEEXT); \
768 ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
769 || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
770 fi
771
772install-data-local:
773 $(mkinstalldirs) $(scriptdir)/ldscripts
774 for f in ldscripts/*; do \
775 $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
776 done
777
778# Stuff that should be included in a distribution. The diststuff
779# target is run by the taz target in ../Makefile.in.
780LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
781diststuff: $(LDDISTSTUFF) info
782
783DISTCLEANFILES = tdirs site.exp site.bak
784distclean-local:
785 rm -rf ldscripts
786
787# Targets to rebuild dependencies in this Makefile.
f4162f5c
ILT
788# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
789DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
790 rm -f DEP1
791 $(MAKE) MKDEP=$(MKDEP) DEP1
792 sed -f dep.sed <DEP1 >DEP
252b5132
RH
793
794# This rule really wants a mkdep that runs "gcc -MM".
f4162f5c
ILT
795DEP1: $(CFILES) $(GENERATED_CFILES)
796 rm -f DEP2
797 echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
798 $(MKDEP) -f DEP2 $(INCLUDES) $?
799 $(srcdir)/../move-if-change DEP2 DEP1
252b5132
RH
800
801dep.sed: dep-in.sed config.status
802 sed <$(srcdir)/dep-in.sed >dep.sed \
803 -e 's!@INCDIR@!$(INCDIR)!' \
804 -e 's!@SRCDIR@!$(srcdir)!'
805
f4162f5c 806dep: DEP
252b5132 807 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
f4162f5c 808 cat DEP >> tmp-Makefile
252b5132
RH
809 $(srcdir)/../move-if-change tmp-Makefile Makefile
810
f4162f5c 811dep-in: DEP
252b5132 812 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
f4162f5c 813 cat DEP >> tmp-Makefile.in
252b5132
RH
814 $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
815
f4162f5c 816dep-am: DEP
252b5132 817 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
f4162f5c 818 cat DEP >> tmp-Makefile.am
252b5132
RH
819 $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
820
821.PHONY: dep dep-in dep-am
822
823# What appears below is generated by a hacked mkdep using gcc -MM.
824
825# DO NOT DELETE THIS LINE -- mkdep uses it.
826# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
827
828ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
829 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
830 ld.h ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
831ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
832 sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldemul.h \
833 ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldemul-list.h
834ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
835 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
836 ld.h ldmain.h ldmisc.h ldexp.h ldgram.h ldlang.h
837ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
838 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
839 ld.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
840 ldlex.h ldemul.h
841ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
842 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
843 $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
844 ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h ldmisc.h \
f4162f5c 845 ldctor.h ldfile.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
252b5132
RH
846ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
847 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
848 $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
849 ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h ldemul.h \
850 ldlex.h ldfile.h ldctor.h
851ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
852 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
853 $(INCDIR)/demangle.h ld.h ldmisc.h ldexp.h ldlang.h \
854 ldgram.h ldlex.h ldmain.h ldfile.h
855ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
856 sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldver.h \
857 ldemul.h ldmain.h
858ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
859 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
860 $(INCDIR)/libiberty.h ld.h ldexp.h ldlang.h ldwrite.h \
861 ldmisc.h ldgram.h ldmain.h
862lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
863 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
864 $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
865 ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
866 ldver.h ldemul.h
867mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \
868 config.h $(INCDIR)/fopen-same.h ld.h ldexp.h ldlang.h \
869 ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
870ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
871 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
872 $(INCDIR)/libiberty.h ld.h ldmain.h ldmisc.h ldexp.h \
873 ldlang.h
874pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
875 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
876 $(INCDIR)/libiberty.h ld.h ldexp.h ldlang.h ldwrite.h \
877 ldmisc.h ldgram.h ldmain.h ldemul.h $(INCDIR)/coff/internal.h \
878 ../bfd/libcoff.h deffile.h
879ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
880 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
881 ld.h ldexp.h ldver.h ldlang.h ldemul.h ldfile.h ldmisc.h \
882 ldmain.h mri.h ldctor.h ldlex.h
883ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
884 ld.h ldgram.h ldmisc.h ldexp.h ldlang.h ldfile.h ldlex.h \
885 ldmain.h
886deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
887 ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
888 ld.h ldmisc.h deffile.h
889
890# IF YOU PUT ANYTHING HERE IT WILL GO AWAY