6 # File in object dir can come from either the current dir or srcdir.
8 "{o}" \Option-f : "{s}"
10 # Default rule that puts each file into separate segment.
13 {CC} {DepDir}{Default}.c {ALL_CFLAGS} {SymOptions} -s {Default} -o {TargDir}{Default}.c.o
15 # Makefile for the GNU linker ld (version 2)
16 # Copyright (C) 1989, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
18 # This file is part of GNU ld..
20 # This program is free software; you can redistribute it and:or modify
21 # it under the terms of the GNU General Public License as published by
22 # the Free Software Foundation; either version 2 of the License, or
23 # (at your option) any later version.
25 # This program is distributed in the hope that it will be useful,
26 # but WITHOUT ANY WARRANTY; without even the implied warranty of
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 # GNU General Public License for more details.
30 # You should have received a copy of the GNU General Public License
31 # along with this program; if not, write to the Free Software
32 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
40 program_transform_name =
41 exec_prefix = {prefix}
42 bindir = {exec_prefix}bin:
43 libdir = {exec_prefix}:lib
44 tooldir = {exec_prefix}:{target_alias}
45 datadir = {prefix}:lib
47 man1dir = {mandir}:man1
48 man2dir = {mandir}:man2
49 man3dir = {mandir}:man3
50 man4dir = {mandir}:man4
51 man5dir = {mandir}:man5
52 man6dir = {mandir}:man6
53 man7dir = {mandir}:man7
54 man8dir = {mandir}:man8
55 man9dir = {mandir}:man9
56 infodir = {prefix}:info
57 includedir = {prefix}:include
58 docdir = {datadir}:doc
59 # We put the scripts in the directory {scriptdir}:ldscripts.
60 # We can't put the scripts in {datadir} because the SEARCH_DIR
61 # directives need to be different for native and cross linkers.
62 scriptdir = {tooldir}:lib
66 INSTALL = `cd {srcdir}; pwd`:::install.sh -c
67 INSTALL_PROGRAM = {INSTALL}
68 INSTALL_DATA = {INSTALL}
69 INSTALL_XFORM = {INSTALL} -t='{program_transform_name}'
70 INSTALL_XFORM1 = {INSTALL_XFORM} -b=.1
82 # Seach path to override the default search path for -lfoo libraries.
83 # If LIB_PATH is empty, the ones in the script (if any) are left alone.
84 # (The default is usually :lib \Option-f usr:lib \Option-f :usr:local:lib, unless building
85 # a cross-linker, in which case the default is empty. See genscripts.sh.)
86 # Otherwise, they are replaced with the ones given in LIB_PATH,
87 # which may have the form \Option-f LIB_PATH=:lib \Option-f :usr:local:lib
90 # Additional libraries which are used when ld is built native. This
91 # is set by some host makefile fragments.
96 INCDIR = {BASEDIR}include
97 INCLUDES = -i : -i {srcdir} -i ::bfd: -i {BFDDIR} -i {INCDIR} -i ::extra-include -i "{INCDIR}":mpw:
100 # What version of the manual to build
103 # Where to find texinfo.tex to format docn with TeX
104 TEXIDIR = "{srcdir}":texinfo
106 # Where to find other docs needed to format with TeX
107 TEXINPUTS = {TEXIDIR} \Option-f {BFDDIR}:doc \Option-f {srcdir}
109 # Whether to get roff to put indexing entries on stderr
111 # You neeed this to generate ld-index.ms (or .mm or .me)
116 # Which roff program to use to generate index for texi2roff'd doc
119 #stuff for self hosting (can be overridden in config file).
120 HOSTING_CRT0 = "{o}":lib:crt0.c.o
121 HOSTING_LIBS = `if [ -f ::gcc:libgcc.o ] ; then echo ::gcc:libgcc.o ; else gcc -print-libgcc-file-name; fi` -lc
122 HOSTING_EMU = -m {EMUL}
124 CXX = `if [ -f ::gcc:xgcc ] ; then \Option-d
125 echo ::gcc:xgcc -B::gcc:; \Option-d
126 else echo gcc; \Option-d
128 CXXFLAGS = -fgnu-linker
130 # FIX_ME \Option-f using ::gcc:xgcc breaks the cdtest.
133 # Setup the testing framework, if you have one
136 RUNTEST_CC = `if [ -f ::gcc:xgcc ] ; then \Option-d
137 echo ::gcc:xgcc -B::gcc:; \Option-d
138 else echo gcc; \Option-d
140 RUNTEST_CFLAGS = {CFLAGS}
141 RUNTEST_CXX = `if [ -f ::gcc:xgcc ] ; then \Option-d
142 echo ::gcc:xgcc -B::gcc:; \Option-d
143 else echo gcc; \Option-d
145 # FIX_ME \Option-f using ::gcc:xgcc breaks the cdtest.
147 RUNTEST_CXXFLAGS = {CXXFLAGS}
149 # go directly to ld.new in case this ld isn't capable of
150 # linking native object on this host. It can be renamed on
154 all \Option-f {LD_PROG}
155 # .PHONY \Option-f all
157 ### Host, target, and site specific Makefile fragments come in here.
160 LINTFLAGS = {INCLUDES} {EXTRA_DEF}
162 # The "{s}".cc suffix is used by `make check'.
164 # .SUFFIXES \Option-f "{s}".y {SUFFIXES} "{s}".cc
166 # Suppress smart makes who think they know how to automake Yacc files
169 # This rule is used for the check-cdtest target.
170 "{o}".cc.c.o \Option-f
171 {CXX} -c -i {srcdir} {CXXFLAGS} {CFLAGS} $<
173 ALL_CFLAGS={INCLUDES} {HDEFINES} {TDEFINES} {CDEFINES} {CFLAGS}
174 "{o}".c.c.o \Option-f
175 {CC} -c {ALL_CFLAGS} $<
178 BFDLIB = ::bfd:libbfd.o
179 LIBIBERTY = ::libiberty:libiberty.o
181 ALL_EMULATIONS = "{o}"em_lnk960.c.o "{o}"em_sun3.c.o "{o}"em_i386aout.c.o "{o}"em_go32.c.o "{o}"em_vsta.c.o \Option-d
182 "{o}"em_m88kbcs.c.o "{o}"em_a29k.c.o "{o}"em_news.c.o "{o}"em_hp300bsd.c.o "{o}"em_hp3hpux.c.o \Option-d
183 "{o}"em_h8300.c.o "{o}"em_h8300h.c.o "{o}"em_ebmon29k.c.o "{o}"em_sun4.c.o "{o}"em_gld960.c.o \Option-d
184 "{o}"em_m68kcoff.c.o "{o}"em_st2000.c.o "{o}"em_sa29200.c.o "{o}"em_i386mach.c.o \Option-d
185 "{o}"em_vanilla.c.o "{o}"em_i386coff.c.o "{o}"em_z8ksim.c.o "{o}"em_mipslit.c.o "{o}"em_i386bsd.c.o \Option-d
186 "{o}"em_mipsbig.c.o "{o}"em_mipsbsd.c.o "{o}"em_mipsidt.c.o "{o}"em_vax.c.o "{o}"em_h8500.c.o \Option-d
187 "{o}"em_hppaosf.c.o "{o}"em_mipsidtl.c.o "{o}"em_sh.c.o "{o}"em_elf_i386.c.o "{o}"em_alpha.c.o \Option-d
188 "{o}"em_i386lynx.c.o "{o}"em_m68klynx.c.o "{o}"em_sparclynx.c.o "{o}"em_coff_sparc.c.o \Option-d
189 "{o}"em_delta68.c.o \Option-d
192 # This is now set by configure.in.
193 EMULATION_OFILES = "{o}"em_mipsidt.c.o
195 CFILES = "{s}"ldctor.c "{s}"ldemul.c "{s}"ldexp.c "{s}"ldfile.c "{s}"ldlang.c \Option-d
196 ldmain.c "{s}"ldmisc.c "{s}"ldver.c "{s}"ldwrite.c "{s}"lexsup.c \Option-d
200 HFILES = "{s}"config.h "{s}"ld.h "{s}"ldctor.h "{s}"ldemul.h "{s}"ldexp.h "{s}"ldfile.h \Option-d
201 ldlang.h "{s}"ldlex.h "{s}"ldmain.h "{s}"ldmisc.h "{s}"ldver.h \Option-d
204 GENERATED_CFILES = :ldgram.c :ldlex.c
205 GENERATED_HFILES = :ldgram.h :ldemul-list.h
207 OFILES = "{o}"ldgram.c.o "{o}"ldlex.c.o "{o}"lexsup.c.o "{o}"ldlang.c.o "{o}"mri.c.o "{o}"ldctor.c.o "{o}"ldmain.c.o \Option-d
208 "{o}"ldwrite.c.o "{o}"ldexp.c.o "{o}"ldemul.c.o "{o}"ldver.c.o "{o}"ldmisc.c.o \Option-d
209 "{o}"ldfile.c.o {EMULATION_OFILES}
211 LINTSOURCES = {CFILES} {GENERATED_CFILES} em_\Option-x.c
213 STAGESTUFF = "{o}"\Option-x.c.o ldscripts:\Option-x em_\Option-x.c {GENERATED_CFILES} {GENERATED_HFILES}
215 info \Option-f ld.info
216 # .PHONY \Option-f info
218 :ldgram.h :ldgram.c \Option-f "{s}"ldgram.y
219 {BISON} {BISONFLAGS} -d "{srcdir}"ldgram.y
220 Rename -y y.tab.c :ldgram.c
221 Rename -y y.tab.h :ldgram.h
223 # EMUL is the name of a file in the emulparams subdir, without the .sh.
224 "{o}"ldmain.c.o \Option-f "{s}"ldmain.c config.status
225 {CC} {INCLUDES} {HDEFINES} {TDEFINES} {CDEFINES} -d DEFAULT_EMULATION=\Option-d"{EMUL}\Option-d" -d SCRIPTDIR=\Option-d"{scriptdir}\Option-d" {CFLAGS} "{s}"ldmain.c -o "{o}"ldmain.c.o
228 # Use this when flex is working correctly.
229 :ldlex.c \Option-f "{s}"ldlex.l
230 {LEX} -i -Cem "{srcdir}"ldlex.l
231 Catenate :lex.yy.c >:ldlex.c.new
233 Rename -y :ldlex.c.new :ldlex.c
234 #:ldlex.c \Option-f "{s}"mpw-ldlex.c
235 # Catenate "{s}"mpw-ldlex.c >:ldlex.c
237 # These all start with em_ so 'make clean' can find them.
239 GENSCRIPTS = {SHELL} "{srcdir}"genscripts.sh {srcdir} {libdir} {host_alias} {target_alias} {EMUL} "{NATIVE_LIB_DIRS}"
240 GEN_DEPENDS = "{srcdir}"genscripts.sh
242 em_sun4.c \Option-f "{srcdir}"emulparams:sun4.sh \Option-d
243 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
245 em_sun3.c \Option-f "{srcdir}"emulparams:sun3.sh \Option-d
246 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
248 em_vsta.c \Option-f "{srcdir}"emulparams:vsta.sh \Option-d
249 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
251 em_go32.c \Option-f "{srcdir}"emulparams:go32.sh \Option-d
252 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
254 em_news.c \Option-f "{srcdir}"emulparams:news.sh \Option-d
255 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
257 em_vax.c \Option-f "{srcdir}"emulparams:vax.sh \Option-d
258 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
260 em_hp300bsd.c \Option-f "{srcdir}"emulparams:hp300bsd.sh \Option-d
261 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
262 {GENSCRIPTS} hp300bsd
263 em_hp3hpux.c \Option-f "{srcdir}"emulparams:hp3hpux.sh \Option-d
264 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
266 em_hppaosf.c \Option-f "{srcdir}"emulparams:hppaosf.sh \Option-d
267 "{srcdir}"emultempl:hppaosf.em "{srcdir}"scripttempl:hppaosf.sc {GEN_DEPENDS}
269 em_i386aout.c \Option-f "{srcdir}"emulparams:i386aout.sh \Option-d
270 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
271 {GENSCRIPTS} i386aout
272 em_i386mach.c \Option-f "{srcdir}"emulparams:i386mach.sh \Option-d
273 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
274 {GENSCRIPTS} i386mach
275 em_ebmon29k.c \Option-f "{srcdir}"emulparams:ebmon29k.sh \Option-d
276 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:ebmon29k.sc {GEN_DEPENDS}
277 {GENSCRIPTS} ebmon29k
278 em_sa29200.c \Option-f "{srcdir}"emulparams:sa29200.sh \Option-d
279 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sa29200.sc {GEN_DEPENDS}
281 em_a29k.c \Option-f "{srcdir}"emulparams:a29k.sh \Option-d
282 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:a29k.sc {GEN_DEPENDS}
284 em_m88kbcs.c \Option-f "{srcdir}"emulparams:m88kbcs.sh \Option-d
285 "{srcdir}"emultempl:m88kbcs.em "{srcdir}"scripttempl:m88kbcs.sc {GEN_DEPENDS}
287 em_h8300.c \Option-f "{srcdir}"emulparams:h8300.sh \Option-d
288 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:h8300.sc {GEN_DEPENDS}
290 em_h8300h.c \Option-f "{srcdir}"emulparams:h8300h.sh \Option-d
291 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:h8300h.sc {GEN_DEPENDS}
293 em_h8500.c \Option-f "{srcdir}"emulparams:h8500.sh \Option-d
294 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:h8500.sc {GEN_DEPENDS}
296 em_sh.c \Option-f "{srcdir}"emulparams:sh.sh \Option-d
297 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sh.sc {GEN_DEPENDS}
299 em_st2000.c \Option-f "{srcdir}"emulparams:st2000.sh \Option-d
300 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:st2000.sc {GEN_DEPENDS}
302 em_z8ksim.c \Option-f "{srcdir}"emulparams:z8ksim.sh \Option-d
303 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:z8ksim.sc {GEN_DEPENDS}
305 em_vanilla.c \Option-f "{srcdir}"emulparams:vanilla.sh \Option-d
306 "{srcdir}"emultempl:vanilla.em "{srcdir}"scripttempl:vanilla.sc {GEN_DEPENDS}
308 em_lnk960.c \Option-f "{srcdir}"emulparams:lnk960.sh \Option-d
309 "{srcdir}"emultempl:lnk960.em "{srcdir}"scripttempl:i960.sc {GEN_DEPENDS}
311 em_gld960.c \Option-f "{srcdir}"emulparams:gld960.sh \Option-d
312 "{srcdir}"emultempl:gld960.em "{srcdir}"scripttempl:i960.sc {GEN_DEPENDS}
314 em_m68kcoff.c \Option-f "{srcdir}"emulparams:m68kcoff.sh \Option-d
315 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:m68kcoff.sc {GEN_DEPENDS}
316 {GENSCRIPTS} m68kcoff
317 em_delta68.c \Option-f "{srcdir}"emulparams:delta68.sh \Option-d
318 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:delta68.sc {GEN_DEPENDS}
320 em_m68klynx.c \Option-f "{srcdir}"emulparams:m68klynx.sh \Option-d
321 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:m68kcoff.sc {GEN_DEPENDS}
322 {GENSCRIPTS} m68klynx
323 em_i386coff.c \Option-f "{srcdir}"emulparams:i386coff.sh \Option-d
324 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:i386coff.sc {GEN_DEPENDS}
325 {GENSCRIPTS} i386coff
326 em_i386lynx.c \Option-f "{srcdir}"emulparams:i386lynx.sh \Option-d
327 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:i386coff.sc {GEN_DEPENDS}
328 {GENSCRIPTS} i386lynx
329 em_sparclynx.c \Option-f "{srcdir}"emulparams:sparclynx.sh \Option-d
330 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sparccoff.sc {GEN_DEPENDS}
331 {GENSCRIPTS} sparclynx
332 em_mipslit.c \Option-f "{srcdir}"emulparams:mipslit.sh \Option-d
333 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
335 em_i386bsd.c \Option-f "{srcdir}"emulparams:i386bsd.sh \Option-d
336 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
338 em_mipsbig.c \Option-f "{srcdir}"emulparams:mipsbig.sh \Option-d
339 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
341 em_mipsbsd.c \Option-f "{srcdir}"emulparams:mipsbsd.sh \Option-d
342 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
344 em_mipsidt.c \Option-f "{srcdir}"emulparams:mipsidt.sh \Option-d
345 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
347 em_mipsidtl.c \Option-f "{srcdir}"emulparams:mipsidtl.sh \Option-d
348 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
349 {GENSCRIPTS} mipsidtl
350 em_elf_i386.c \Option-f "{srcdir}"emulparams:elf_i386.sh \Option-d
351 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:elf.sc {GEN_DEPENDS}
352 {GENSCRIPTS} elf_i386
353 em_elf32mipb.c \Option-f "{srcdir}"emulparams:elf32mipb.sh \Option-d
354 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:elf.sc {GEN_DEPENDS}
355 {GENSCRIPTS} elf32mipb
356 em_alpha.c \Option-f "{srcdir}"emulparams:alpha.sh \Option-d
357 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:alpha.sc {GEN_DEPENDS}
359 em_coff_sparc.c \Option-f "{srcdir}"emulparams:coff_sparc.sh \Option-d
360 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sparccoff.sc {GEN_DEPENDS}
361 {GENSCRIPTS} coff_sparc
363 {LD_PROG} \Option-f {OFILES} {BFDLIB} {LIBIBERTY}
364 Link {LDFLAGS} -o {LD_PROG} {OFILES} {BFDLIB} {LIBIBERTY} {EXTRALIBS}
366 # The generated emulation files mostly have the same dependencies.
367 {EMULATION_OFILES} \Option-f ::bfd:bfd.h ::bfd:sysdep.h "{INCDIR}":bfdlink.h \Option-d
368 "{s}"ld.h "{s}"ldmain.h "{s}"ldemul.h "{s}"ldfile.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"config.h "{s}"ldctor.h
370 # These targets are for the dejagnu testsuites. The file site.exp
371 # contains global variables that all the testsuites will use.
372 # There is a current debate as to how and where to generate test
373 # outputs. Rob feels each test should be built in {objdir} with
374 # a unique name. Cassidy feels that we should create a directory
375 # called {objdir}:tmpdir and do the work there. This way, there
376 # is no potential conflict with existing objects, ie \Option-f as there
377 # was in the past with "{o}"loop.c.o and "{o}"flow.c.o, and, there is no chance
378 # of filling :tmp, which would cause other problems. Lastly, this
379 # allow retention of the testcase name making debugging easier.
381 testdir = {objdir}:tmpdir
383 site.exp \Option-f :config.status Makefile
384 @if [ -d {testdir} ]; then true; else mkdir {testdir}; fi
385 @echo "Making a new config file..."
388 @mv site.exp site.bak
389 @echo "## variables are automatically generated by make ##" > :tmp0
390 @echo "# Do not edit here. If you wish to override these" >> :tmp0
391 @echo "# values, add them to the last section" >> :tmp0
392 @echo "# HOST AND TARGET INFO" >> :tmp0
393 @echo "set host_os {host_os}" >> :tmp0
394 @echo "set host_alias {host_alias}" >> :tmp0
395 @echo "set host_cpu {host_cpu}" >> :tmp0
396 @echo "set host_vendor {host_vendor}" >> :tmp0
397 @echo "set target_os {target_os}" >> :tmp0
398 @echo "set target_alias {target_alias}" >> :tmp0
399 @echo "set target_cpu {target_cpu}" >> :tmp0
400 @echo "set target_vendor {target_vendor}" >> :tmp0
401 @echo "set host_triplet {host_canonical}" >> :tmp0
402 @echo "set target_triplet {target_canonical}" >> :tmp0
403 @echo "# DIRECTORY INFO" >> :tmp0
404 @echo "set objdir `pwd`" >> :tmp0
405 @echo "set tmpdir `cd {testdir}; pwd`" >> :tmp0
407 @echo "# LD DEPENDANCIES" >> :tmp0
408 @echo "set OFILES \"{OFILES}\"" >> :tmp0
409 @echo "set BFDLIB \"{BFDLIB}\"" >> :tmp0
410 @echo "set LIBIBERTY \"{LIBIBERTY}\"" >> :tmp0
411 @echo "set HOSTING_EMU \"{HOSTING_EMU}\"" >> :tmp0
412 @echo "set HOSTING_CRT0 \"{HOSTING_CRT0}\"" >> :tmp0
413 @echo "set HOSTING_LIBS \"{HOSTING_LIBS}\"" >> :tmp0
415 @echo "## Variables generated by configure. Do Not Edit ##" >> :tmp0
416 @cat :tmp0 > site.exp
417 @cat site.bak | sed \Option-d
418 e '1,:^## Variables generated by.\Option-x##: d' >> site.exp
421 check \Option-f ld.new site.exp
422 {RUNTEST} --tool ld \Option-d
423 -srcdir "{srcdir}"testsuite {RUNTEST_FLAGS} \Option-d
424 CC="{RUNTEST_CC}" CFLAGS="{RUNTEST_CFLAGS}" \Option-d
425 CXX="{RUNTEST_CXX}" CXXFLAGS="{RUNTEST_CXXFLAGS}"
427 installcheck \Option-f
428 # .PHONY \Option-f check installcheck
430 # Rules for testing by relinking ld itself.
432 "{o}"ld-partial.c.o \Option-f ld.new
433 :ld.new {HOSTING_EMU} -o "{o}"ld-partial.c.o -r {OFILES}
434 ld1 \Option-f "{o}"ld-partial.c.o
435 :ld.new {HOSTING_EMU} -o ld1 {HOSTING_CRT0} "{o}"ld-partial.c.o {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
437 ld1-full \Option-f ld.new
438 :ld.new {HOSTING_EMU} -o ld1-full {HOSTING_CRT0} {OFILES} {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
441 :ld1 {HOSTING_EMU} -o ld2 {HOSTING_CRT0} {OFILES} {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
444 :ld2 {HOSTING_EMU} -o ld3 {HOSTING_CRT0} {OFILES} {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
446 bootstrap \Option-f ld3
449 # .PHONY \Option-f bootstrap
451 # A test program for C++ constructors and destructors.
453 cdtest \Option-f "{o}"cdtest-main.c.o "{o}"cdtest-func.c.o "{o}"cdtest-foo.c.o ld.new
454 :ld.new {HOSTING_EMU} -o cdtest {HOSTING_CRT0} \Option-d
455 "{o}"cdtest-main.c.o "{o}"cdtest-func.c.o "{o}"cdtest-foo.c.o {HOSTING_LIBS}
457 check-cdtest \Option-f cdtest "{srcdir}"cdtest.exp
458 :cdtest "{o}">cdtest.c.out
459 diff "{srcdir}"cdtest.exp "{o}"cdtest.c.out
461 # .PHONY \Option-f check-cdtest
463 # END OF CHECK TARGETS
465 # DOCUMENTATION TARGETS
466 # Manual configuration file; not usually attached to normal configuration,
467 # because almost all configs use "gen" version of manual.
468 # Set DOCVER above to change.
469 configdoc.texi \Option-f {DOCVER}-doc.texi
470 # ln -s "{srcdir}"{DOCVER}-doc.texi :configdoc.texi || \Option-d
471 # ln "{srcdir}"{DOCVER}-doc.texi :configdoc.texi || \Option-d
472 Duplicate -d -y "{srcdir}"{DOCVER}-doc.texi :configdoc.texi
476 ld.dvi \Option-f "{srcdir}"ld.texinfo "{srcdir}"configdoc.texi {BFDDIR}:doc:bfdsumm.texi
477 TEXINPUTS={BFDDIR}:doc \Option-f $$TEXINPUTS {TEXI2DVI} "{srcdir}"ld.texinfo
479 ldint.dvi \Option-f "{srcdir}"ldint.texinfo
480 {TEXI2DVI} "{srcdir}"ldint.texinfo
482 # info file for online browsing
483 ld.info \Option-f "{srcdir}"ld.texinfo configdoc.texi {BFDDIR}:doc:bfdsumm.texi
484 {MAKEINFO} -i {BFDDIR}:doc -o ld.info "{srcdir}"ld.texinfo
486 ldint.info \Option-f "{srcdir}"ldint.texinfo
487 {MAKEINFO} -o ldint.info "{srcdir}"ldint.texinfo
489 # .PHONY \Option-f dvi
491 #separate targets for "ms", "me", and "mm" forms of roff doc
492 # Try to use a recent texi2roff. v2 was put on prep in jan91.
493 # If you want an index, see texi2roff doc for postprocessing
494 # and add -i to texi2roff invocations below.
495 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
496 # correspondint -e lines when later texi2roff's are current)
497 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
498 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
499 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
500 # + @alphaenumerate is ridiculously new, turned into @enumerate
502 ld.ms \Option-f "{srcdir}"ld.texinfo
503 sed -e ':\\input texinfo:d' \Option-d
504 e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d
505 e ':^end ifinfo:d' \Option-d
507 e 's:{.\Option-x,,:{:' \Option-d
508 e 's:@ : :g' \Option-d
509 e 's:^enumerate:g' \Option-d
510 e 's:^@end alphaenumerate:@end enumerate:g' \Option-d
511 "{srcdir}"ld.texinfo | \Option-d
512 {TEXI2ROFF} {TEXI2OPT} -ms | \Option-d
513 sed -e 's:---:\\(em:g' \Option-d
516 # index for roff output
517 ld-index.ms \Option-f ld.ms
518 {ROFF} -ms ld.ms 2>&1 1>:dev:null | \Option-d
519 sed -e ': \Option-f warning \Option-f :d' | \Option-d
520 texi2index >ld-index.ms
523 ld.mm \Option-f "{srcdir}"ld.texinfo
524 sed -e ':\\input texinfo:d' \Option-d
525 e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d
526 e ':^end ifinfo:d' \Option-d
528 e 's:{.\Option-x,,:{:' \Option-d
529 e ':@noindent:d' \Option-d
530 e 's:@ : :g' \Option-d
531 e 's:^enumerate:g' \Option-d
532 e 's:^@end alphaenumerate:@end enumerate:g' \Option-d
533 "{srcdir}"ld.texinfo | \Option-d
534 {TEXI2ROFF} {TEXI2OPT} -mm | \Option-d
535 sed -e 's:---:\\(em:g' \Option-d
538 # index for roff output
539 ld-index.mm \Option-f ld.mm
540 {ROFF} -mm ld.mm 2>&1 1>:dev:null | \Option-d
541 sed -e ': \Option-f warning \Option-f :d' | \Option-d
542 texi2index >ld-index.mm
545 ld.me \Option-f "{srcdir}"ld.texinfo
546 sed -e ':\\input texinfo:d' \Option-d
547 e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d
548 e ':^end ifinfo:d' \Option-d
550 e 's:{.\Option-x,,:{:' \Option-d
551 e 's:@ : :g' \Option-d
552 e 's:^enumerate:g' \Option-d
553 e 's:^@end alphaenumerate:@end enumerate:g' \Option-d
554 "{srcdir}"ld.texinfo | \Option-d
555 {TEXI2ROFF} {TEXI2OPT} -me | \Option-d
556 sed -e 's:---:\\(em:g' \Option-d
559 # index for roff output
560 ld-index.me \Option-f ld.me
561 {ROFF} -me ld.me 2>&1 1>:dev:null | \Option-d
562 sed -e ': \Option-f warning \Option-f :d' | \Option-d
563 texi2index >ld-index.me
565 stage1 \Option-f force
567 Rename -y {STAGESTUFF} {LD_PROG} stage1
568 (cd stage1 ; ln -s {LD_PROG} ld)
570 stage2 \Option-f force
572 Rename -y {STAGESTUFF} {LD_PROG} stage2
573 (cd stage2 ; ln -s {LD_PROG} ld)
575 stage3 \Option-f force
577 Rename -y {STAGESTUFF} {LD_PROG} stage3
578 (cd stage3 ; ln -s {LD_PROG} ld)
582 comparison \Option-f force
583 for i in {STAGESTUFF} {LD_PROG} ; do cmp $$i {against}:$$i ; done
585 de-stage1 \Option-f force
586 (cd stage1 ; mv -f \Option-x ..)
590 de-stage2 \Option-f force
591 (cd stage2 ; mv -f \Option-x ..)
595 de-stage3 \Option-f force
596 (cd stage3 ; mv -f \Option-x ..)
600 # .PHONY \Option-f stage1 stage2 stage3 comparison de-stage1 de-stage2 de-stage3
602 # Stuff that should be included in a distribution \Option-f
603 LDDISTSTUFF = :ldgram.c :ldgram.h :ldlex.c
604 diststuff \Option-f {LDDISTSTUFF}
606 mostlyclean \Option-f
607 Delete -y {STAGESTUFF} ld.?? ld.??? ldlex.[qp]
608 Delete -y ld ld1 ld2 ld3 "{o}"\Option-x.c.o "{o}"y.c.output cdtest "{o}"cdtest.c.out
609 clean \Option-f mostlyclean
612 Delete -yr Makefile config.status TAGS "{s}"sysdep.h ldscripts site.exp \Option-d
613 {STAGESTUFF} ld.?? ld.??s ld.toc ld.aux "{s}"ld.log ldlex.[qp] \Option-d
614 {LD_PROG} ld ld1 ld2 ld3 "{o}"\Option-x.c.o "{o}"y.c.output cdtest "{o}"cdtest.c.out
615 realclean \Option-f clean distclean
616 Delete -y {LDDISTSTUFF}
618 # .PHONY \Option-f diststuff mostlyclean clean distclean realclean
623 etags -t "{srcdir}"\Option-x.[chly] \Option-x.[chly]
626 install \Option-f all install-only
628 install-only \Option-f
629 If "`Exists "{prefix}"`" == ""
630 Echo "{prefix}" does not exist, cannot install anything
633 If "`Exists "{bindir}"`" == ""
636 Duplicate -y :ld.new "{bindir}"ld
638 install-info \Option-f
639 for i in ld.info\Option-x ; do \Option-d
640 {INSTALL_DATA} $$i {infodir}:$$i ; \Option-d
644 Delete -y -rf \Option-x.info\Option-x
646 # .PHONY \Option-f install install-info clean-info
648 # Targets to rebuild dependencies in this Makefile.
649 # Have to get rid of .dep1 here so that "$?" later includes all of {CFILES}.
651 # Dummy target to force execution of dependent targets.
655 # .PHONY \Option-f force
657 Makefile \Option-f "{srcdir}"Makefile.in {host_makefile_frag} {target_makefile_frag}
658 {SHELL} :config.status
660 # What appears below is generated by a hacked mkdep using gcc -MM.
662 # DO NOT DELETE THIS LINE -- mkdep uses it.
663 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
665 "{o}"ldctor.c.o \Option-f "{s}"ldctor.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
666 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
667 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldmisc.h \Option-d
668 :ldgram.h "{s}"ldctor.h
669 "{o}"ldemul.c.o \Option-f "{s}"ldemul.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
670 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
671 "{s}"config.h "{s}"ld.h "{s}"ldemul.h "{s}"ldmisc.h "{s}"ldfile.h "{s}"ldmain.h :ldemul-list.h
672 "{o}"ldexp.c.o \Option-f "{s}"ldexp.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
673 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
674 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldmain.h "{s}"ldmisc.h "{s}"ldexp.h \Option-d
675 :ldgram.h "{s}"ldlang.h
676 "{o}"ldfile.c.o \Option-f "{s}"ldfile.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
677 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
678 "{s}"ld.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldfile.h "{s}"ldmain.h "{s}"ldlex.h
679 "{o}"ldlang.c.o \Option-f "{s}"ldlang.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
680 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
681 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldmain.h :ldgram.h "{s}"ldexp.h \Option-d
682 "{s}"ldlang.h "{s}"ldemul.h "{s}"ldlex.h "{s}"ldmisc.h "{s}"ldctor.h "{s}"ldfile.h
683 "{o}"ldmain.c.o \Option-f "{s}"ldmain.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
684 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
685 "{INCDIR}":bfdlink.h "{s}"config.h "{s}"ld.h "{s}"ldmain.h "{s}"ldmisc.h \Option-d
686 "{s}"ldwrite.h :ldgram.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldemul.h "{s}"ldlex.h \Option-d
687 "{s}"ldfile.h "{s}"ldctor.h
688 "{o}"ldmisc.c.o \Option-f "{s}"ldmisc.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
689 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
690 "{s}"ld.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldlex.h "{s}"ldmain.h "{s}"ldfile.h
691 "{o}"ldver.c.o \Option-f "{s}"ldver.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
692 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
693 "{s}"ld.h "{s}"ldver.h "{s}"ldemul.h "{s}"ldmain.h
694 "{o}"ldwrite.c.o \Option-f "{s}"ldwrite.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
695 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
696 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldwrite.h \Option-d
697 "{s}"ldmisc.h :ldgram.h "{s}"ldmain.h
698 "{o}"lexsup.c.o \Option-f "{s}"lexsup.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
699 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
700 "{s}"ldlex.h "{s}"ld.h "{s}"ldexp.h :ldgram.h "{s}"ldmisc.h
701 "{o}"mri.c.o \Option-f "{s}"mri.c ::bfd:bfd.h "{INCDIR}":ansidecl.h "{INCDIR}":obstack.h \Option-d
702 ::bfd:sysdep.h "{INCDIR}":fopen-same.h "{s}"ld.h "{s}"ldexp.h \Option-d
703 "{s}"ldlang.h "{s}"ldmisc.h "{s}"mri.h :ldgram.h
704 "{o}"ldgram.c.o \Option-f :ldgram.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
705 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
706 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldexp.h "{s}"ldver.h "{s}"ldlang.h "{s}"ldemul.h \Option-d
707 "{s}"ldfile.h "{s}"ldmisc.h "{s}"ldmain.h "{s}"mri.h "{s}"ldlex.h
708 "{o}"ldlex.c.o \Option-f :ldlex.c ::bfd:bfd.h "{INCDIR}":obstack.h \Option-d
709 "{s}"ld.h :ldgram.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldfile.h "{s}"ldlex.h
711 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY