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