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