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