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