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