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