* ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused)
[deliverable/binutils-gdb.git] / ld / mpw-make.in
1
2 s = "{srcdir}"
3
4 o = :
5
6 # File in object dir can come from either the current dir or srcdir.
7
8 "{o}" \Option-f : "{s}"
9
10 # Default rule that puts each file into separate segment.
11
12 .c.o \Option-f .c
13 {CC} {DepDir}{Default}.c {ALL_CFLAGS} {SymOptions} -s {Default} -o {TargDir}{Default}.c.o
14
15 # Makefile for the GNU linker ld (version 2)
16 # Copyright (C) 1989, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
17
18 # This file is part of GNU ld..
19
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.
24 #
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.
29 #
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.
33
34
35 # srcdir = :
36 objdir = :
37
38 prefix = :usr:local
39
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
46 mandir = {prefix}:man
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
63
64 SHELL = :bin:sh
65
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
71
72 AR = ar
73 AR_FLAGS = qv
74 #CFLAGS = -g
75 MAKEINFO = makeinfo
76 TEXI2DVI = texi2dvi
77 RANLIB = ranlib
78 CC_FOR_BUILD={CC}
79 BISON = bison -y
80 LEX = flex
81
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
88 LIB_PATH =
89
90 # Additional libraries which are used when ld is built native. This
91 # is set by some host makefile fragments.
92 NATIVE_LIB_DIRS =
93
94 BASEDIR = "{srcroot}"
95 BFDDIR = {BASEDIR}bfd
96 INCDIR = {BASEDIR}include
97 INCLUDES = -i : -i {srcdir} -i ::bfd: -i {BFDDIR} -i {INCDIR} -i ::extra-include -i "{INCDIR}":mpw:
98 DEP = mkdep
99
100 # What version of the manual to build
101 DOCVER = gen
102
103 # Where to find texinfo.tex to format docn with TeX
104 TEXIDIR = "{srcdir}":texinfo
105
106 # Where to find other docs needed to format with TeX
107 TEXINPUTS = {TEXIDIR} \Option-f {BFDDIR}:doc \Option-f {srcdir}
108
109 # Whether to get roff to put indexing entries on stderr
110 TEXI2OPT =
111 # You neeed this to generate ld-index.ms (or .mm or .me)
112 # TEXI2OPT = -i
113
114 TEXI2ROFF=texi2roff
115
116 # Which roff program to use to generate index for texi2roff'd doc
117 ROFF = groff
118
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}
123
124 CXX = `if [ -f ::gcc:xgcc ] ; then \Option-d
125 echo ::gcc:xgcc -B::gcc:; \Option-d
126 else echo gcc; \Option-d
127 fi`
128 CXXFLAGS = -fgnu-linker
129
130 # FIX_ME \Option-f using ::gcc:xgcc breaks the cdtest.
131 CXX = g++
132
133 # Setup the testing framework, if you have one
134 RUNTEST = runtest
135 RUNTEST_FLAGS =
136 RUNTEST_CC = `if [ -f ::gcc:xgcc ] ; then \Option-d
137 echo ::gcc:xgcc -B::gcc:; \Option-d
138 else echo gcc; \Option-d
139 fi`
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
144 fi`
145 # FIX_ME \Option-f using ::gcc:xgcc breaks the cdtest.
146 RUNTEST_CXX = {CXX}
147 RUNTEST_CXXFLAGS = {CXXFLAGS}
148
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
151 # install.
152 LD_PROG = ld.new
153
154 all \Option-f {LD_PROG}
155 # .PHONY \Option-f all
156
157 ### Host, target, and site specific Makefile fragments come in here.
158 ####
159
160 LINTFLAGS = {INCLUDES} {EXTRA_DEF}
161
162 # The "{s}".cc suffix is used by `make check'.
163
164 # .SUFFIXES \Option-f "{s}".y {SUFFIXES} "{s}".cc
165
166 # Suppress smart makes who think they know how to automake Yacc files
167 # .y.c \Option-f
168
169 # This rule is used for the check-cdtest target.
170 "{o}".cc.c.o \Option-f
171 {CXX} -c -i {srcdir} {CXXFLAGS} {CFLAGS} $<
172
173 ALL_CFLAGS={INCLUDES} {HDEFINES} {TDEFINES} {CDEFINES} {CFLAGS}
174 "{o}".c.c.o \Option-f
175 {CC} -c {ALL_CFLAGS} $<
176
177 # for self hosting
178 BFDLIB = ::bfd:libbfd.o
179 LIBIBERTY = ::libiberty:libiberty.o
180
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
190 {OTHER_EMULATIONS}
191
192 # This is now set by configure.in.
193 EMULATION_OFILES = "{o}"em_mipsidt.c.o
194
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
197 mri.c
198
199
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
202 ldwrite.h "{s}"mri.h
203
204 GENERATED_CFILES = :ldgram.c :ldlex.c
205 GENERATED_HFILES = :ldgram.h :ldemul-list.h
206
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}
210
211 LINTSOURCES = {CFILES} {GENERATED_CFILES} em_\Option-x.c
212
213 STAGESTUFF = "{o}"\Option-x.c.o ldscripts:\Option-x em_\Option-x.c {GENERATED_CFILES} {GENERATED_HFILES}
214
215 info \Option-f ld.info
216 # .PHONY \Option-f info
217
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
222
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
226 fi
227
228
229 :ldlex.c \Option-f "{s}"ldlex.l
230 {LEX} -i -Cem "{srcdir}"ldlex.l
231 Catenate :lex.yy.c >:ldlex.c.new
232 Delete -y :lex.yy.c
233 Rename -y :ldlex.c.new :ldlex.c
234
235 # These all start with em_ so 'make clean' can find them.
236
237 GENSCRIPTS = {SHELL} "{srcdir}"genscripts.sh {srcdir} {libdir} {host_alias} {target_alias} {EMUL} "{NATIVE_LIB_DIRS}"
238 GEN_DEPENDS = "{srcdir}"genscripts.sh
239
240 em_sun4.c \Option-f "{srcdir}"emulparams:sun4.sh \Option-d
241 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
242 {GENSCRIPTS} sun4
243 em_sun3.c \Option-f "{srcdir}"emulparams:sun3.sh \Option-d
244 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
245 {GENSCRIPTS} sun3
246 em_vsta.c \Option-f "{srcdir}"emulparams:vsta.sh \Option-d
247 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
248 {GENSCRIPTS} vsta
249 em_go32.c \Option-f "{srcdir}"emulparams:go32.sh \Option-d
250 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
251 {GENSCRIPTS} go32
252 em_news.c \Option-f "{srcdir}"emulparams:news.sh \Option-d
253 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
254 {GENSCRIPTS} news
255 em_vax.c \Option-f "{srcdir}"emulparams:vax.sh \Option-d
256 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
257 {GENSCRIPTS} vax
258 em_hp300bsd.c \Option-f "{srcdir}"emulparams:hp300bsd.sh \Option-d
259 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
260 {GENSCRIPTS} hp300bsd
261 em_hp3hpux.c \Option-f "{srcdir}"emulparams:hp3hpux.sh \Option-d
262 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
263 {GENSCRIPTS} hp3hpux
264 em_hppaosf.c \Option-f "{srcdir}"emulparams:hppaosf.sh \Option-d
265 "{srcdir}"emultempl:hppaosf.em "{srcdir}"scripttempl:hppaosf.sc {GEN_DEPENDS}
266 {GENSCRIPTS} hppaosf
267 em_i386aout.c \Option-f "{srcdir}"emulparams:i386aout.sh \Option-d
268 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
269 {GENSCRIPTS} i386aout
270 em_i386mach.c \Option-f "{srcdir}"emulparams:i386mach.sh \Option-d
271 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
272 {GENSCRIPTS} i386mach
273 em_ebmon29k.c \Option-f "{srcdir}"emulparams:ebmon29k.sh \Option-d
274 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:ebmon29k.sc {GEN_DEPENDS}
275 {GENSCRIPTS} ebmon29k
276 em_sa29200.c \Option-f "{srcdir}"emulparams:sa29200.sh \Option-d
277 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sa29200.sc {GEN_DEPENDS}
278 {GENSCRIPTS} sa29200
279 em_a29k.c \Option-f "{srcdir}"emulparams:a29k.sh \Option-d
280 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:a29k.sc {GEN_DEPENDS}
281 {GENSCRIPTS} a29k
282 em_m88kbcs.c \Option-f "{srcdir}"emulparams:m88kbcs.sh \Option-d
283 "{srcdir}"emultempl:m88kbcs.em "{srcdir}"scripttempl:m88kbcs.sc {GEN_DEPENDS}
284 {GENSCRIPTS} m88kbcs
285 em_h8300.c \Option-f "{srcdir}"emulparams:h8300.sh \Option-d
286 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:h8300.sc {GEN_DEPENDS}
287 {GENSCRIPTS} h8300
288 em_h8300h.c \Option-f "{srcdir}"emulparams:h8300h.sh \Option-d
289 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:h8300h.sc {GEN_DEPENDS}
290 {GENSCRIPTS} h8300h
291 em_h8500.c \Option-f "{srcdir}"emulparams:h8500.sh \Option-d
292 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:h8500.sc {GEN_DEPENDS}
293 {GENSCRIPTS} h8500
294 em_sh.c \Option-f "{srcdir}"emulparams:sh.sh \Option-d
295 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sh.sc {GEN_DEPENDS}
296 {GENSCRIPTS} sh
297 em_st2000.c \Option-f "{srcdir}"emulparams:st2000.sh \Option-d
298 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:st2000.sc {GEN_DEPENDS}
299 {GENSCRIPTS} st2000
300 em_z8ksim.c \Option-f "{srcdir}"emulparams:z8ksim.sh \Option-d
301 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:z8ksim.sc {GEN_DEPENDS}
302 {GENSCRIPTS} z8ksim
303 em_vanilla.c \Option-f "{srcdir}"emulparams:vanilla.sh \Option-d
304 "{srcdir}"emultempl:vanilla.em "{srcdir}"scripttempl:vanilla.sc {GEN_DEPENDS}
305 {GENSCRIPTS} vanilla
306 em_lnk960.c \Option-f "{srcdir}"emulparams:lnk960.sh \Option-d
307 "{srcdir}"emultempl:lnk960.em "{srcdir}"scripttempl:i960.sc {GEN_DEPENDS}
308 {GENSCRIPTS} lnk960
309 em_gld960.c \Option-f "{srcdir}"emulparams:gld960.sh \Option-d
310 "{srcdir}"emultempl:gld960.em "{srcdir}"scripttempl:i960.sc {GEN_DEPENDS}
311 {GENSCRIPTS} gld960
312 em_m68kcoff.c \Option-f "{srcdir}"emulparams:m68kcoff.sh \Option-d
313 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:m68kcoff.sc {GEN_DEPENDS}
314 {GENSCRIPTS} m68kcoff
315 em_delta68.c \Option-f "{srcdir}"emulparams:delta68.sh \Option-d
316 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:delta68.sc {GEN_DEPENDS}
317 {GENSCRIPTS} delta68
318 em_m68klynx.c \Option-f "{srcdir}"emulparams:m68klynx.sh \Option-d
319 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:m68kcoff.sc {GEN_DEPENDS}
320 {GENSCRIPTS} m68klynx
321 em_i386coff.c \Option-f "{srcdir}"emulparams:i386coff.sh \Option-d
322 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:i386coff.sc {GEN_DEPENDS}
323 {GENSCRIPTS} i386coff
324 em_i386lynx.c \Option-f "{srcdir}"emulparams:i386lynx.sh \Option-d
325 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:i386coff.sc {GEN_DEPENDS}
326 {GENSCRIPTS} i386lynx
327 em_sparclynx.c \Option-f "{srcdir}"emulparams:sparclynx.sh \Option-d
328 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sparccoff.sc {GEN_DEPENDS}
329 {GENSCRIPTS} sparclynx
330 em_mipslit.c \Option-f "{srcdir}"emulparams:mipslit.sh \Option-d
331 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
332 {GENSCRIPTS} mipslit
333 em_i386bsd.c \Option-f "{srcdir}"emulparams:i386bsd.sh \Option-d
334 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
335 {GENSCRIPTS} i386bsd
336 em_mipsbig.c \Option-f "{srcdir}"emulparams:mipsbig.sh \Option-d
337 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
338 {GENSCRIPTS} mipsbig
339 em_mipsbsd.c \Option-f "{srcdir}"emulparams:mipsbsd.sh \Option-d
340 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
341 {GENSCRIPTS} mipsbsd
342 em_mipsidt.c \Option-f "{srcdir}"emulparams:mipsidt.sh \Option-d
343 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
344 {GENSCRIPTS} mipsidt
345 em_mipsidtl.c \Option-f "{srcdir}"emulparams:mipsidtl.sh \Option-d
346 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
347 {GENSCRIPTS} mipsidtl
348 em_elf_i386.c \Option-f "{srcdir}"emulparams:elf_i386.sh \Option-d
349 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:elf.sc {GEN_DEPENDS}
350 {GENSCRIPTS} elf_i386
351 em_elf32mipb.c \Option-f "{srcdir}"emulparams:elf32mipb.sh \Option-d
352 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:elf.sc {GEN_DEPENDS}
353 {GENSCRIPTS} elf32mipb
354 em_alpha.c \Option-f "{srcdir}"emulparams:alpha.sh \Option-d
355 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:alpha.sc {GEN_DEPENDS}
356 {GENSCRIPTS} alpha
357 em_coff_sparc.c \Option-f "{srcdir}"emulparams:coff_sparc.sh \Option-d
358 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sparccoff.sc {GEN_DEPENDS}
359 {GENSCRIPTS} coff_sparc
360
361 {LD_PROG} \Option-f {OFILES} {BFDLIB} {LIBIBERTY}
362 Link {LDFLAGS} -o {LD_PROG} {OFILES} {BFDLIB} {LIBIBERTY} {EXTRALIBS}
363
364 # The generated emulation files mostly have the same dependencies.
365 {EMULATION_OFILES} \Option-f ::bfd:bfd.h ::bfd:sysdep.h "{INCDIR}":bfdlink.h \Option-d
366 "{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
367
368 # These targets are for the dejagnu testsuites. The file site.exp
369 # contains global variables that all the testsuites will use.
370 # There is a current debate as to how and where to generate test
371 # outputs. Rob feels each test should be built in {objdir} with
372 # a unique name. Cassidy feels that we should create a directory
373 # called {objdir}:tmpdir and do the work there. This way, there
374 # is no potential conflict with existing objects, ie \Option-f as there
375 # was in the past with "{o}"loop.c.o and "{o}"flow.c.o, and, there is no chance
376 # of filling :tmp, which would cause other problems. Lastly, this
377 # allow retention of the testcase name making debugging easier.
378 #
379 testdir = {objdir}:tmpdir
380
381 site.exp \Option-f :config.status Makefile
382 @if [ -d {testdir} ]; then true; else mkdir {testdir}; fi
383 @echo "Making a new config file..."
384 @rm -f :tmp?
385 @touch site.exp
386 @mv site.exp site.bak
387 @echo "## variables are automatically generated by make ##" > :tmp0
388 @echo "# Do not edit here. If you wish to override these" >> :tmp0
389 @echo "# values, add them to the last section" >> :tmp0
390 @echo "# HOST AND TARGET INFO" >> :tmp0
391 @echo "set host_os {host_os}" >> :tmp0
392 @echo "set host_alias {host_alias}" >> :tmp0
393 @echo "set host_cpu {host_cpu}" >> :tmp0
394 @echo "set host_vendor {host_vendor}" >> :tmp0
395 @echo "set target_os {target_os}" >> :tmp0
396 @echo "set target_alias {target_alias}" >> :tmp0
397 @echo "set target_cpu {target_cpu}" >> :tmp0
398 @echo "set target_vendor {target_vendor}" >> :tmp0
399 @echo "set host_triplet {host_canonical}" >> :tmp0
400 @echo "set target_triplet {target_canonical}" >> :tmp0
401 @echo "# DIRECTORY INFO" >> :tmp0
402 @echo "set objdir `pwd`" >> :tmp0
403 @echo "set tmpdir `cd {testdir}; pwd`" >> :tmp0
404 @echo "" >> :tmp0
405 @echo "# LD DEPENDANCIES" >> :tmp0
406 @echo "set OFILES \"{OFILES}\"" >> :tmp0
407 @echo "set BFDLIB \"{BFDLIB}\"" >> :tmp0
408 @echo "set LIBIBERTY \"{LIBIBERTY}\"" >> :tmp0
409 @echo "set HOSTING_EMU \"{HOSTING_EMU}\"" >> :tmp0
410 @echo "set HOSTING_CRT0 \"{HOSTING_CRT0}\"" >> :tmp0
411 @echo "set HOSTING_LIBS \"{HOSTING_LIBS}\"" >> :tmp0
412 @echo "" >> :tmp0
413 @echo "## Variables generated by configure. Do Not Edit ##" >> :tmp0
414 @cat :tmp0 > site.exp
415 @cat site.bak | sed \Option-d
416 e '1,:^## Variables generated by.\Option-x##: d' >> site.exp
417 @rm -f :tmp?
418
419 check \Option-f ld.new site.exp
420 {RUNTEST} --tool ld \Option-d
421 -srcdir "{srcdir}"testsuite {RUNTEST_FLAGS} \Option-d
422 CC="{RUNTEST_CC}" CFLAGS="{RUNTEST_CFLAGS}" \Option-d
423 CXX="{RUNTEST_CXX}" CXXFLAGS="{RUNTEST_CXXFLAGS}"
424
425 installcheck \Option-f
426 # .PHONY \Option-f check installcheck
427
428 # Rules for testing by relinking ld itself.
429
430 "{o}"ld-partial.c.o \Option-f ld.new
431 :ld.new {HOSTING_EMU} -o "{o}"ld-partial.c.o -r {OFILES}
432 ld1 \Option-f "{o}"ld-partial.c.o
433 :ld.new {HOSTING_EMU} -o ld1 {HOSTING_CRT0} "{o}"ld-partial.c.o {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
434
435 ld1-full \Option-f ld.new
436 :ld.new {HOSTING_EMU} -o ld1-full {HOSTING_CRT0} {OFILES} {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
437
438 ld2 \Option-f ld1
439 :ld1 {HOSTING_EMU} -o ld2 {HOSTING_CRT0} {OFILES} {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
440
441 ld3 \Option-f ld2
442 :ld2 {HOSTING_EMU} -o ld3 {HOSTING_CRT0} {OFILES} {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
443
444 bootstrap \Option-f ld3
445 cmp ld2 ld3
446
447 # .PHONY \Option-f bootstrap
448
449 # A test program for C++ constructors and destructors.
450
451 cdtest \Option-f "{o}"cdtest-main.c.o "{o}"cdtest-func.c.o "{o}"cdtest-foo.c.o ld.new
452 :ld.new {HOSTING_EMU} -o cdtest {HOSTING_CRT0} \Option-d
453 "{o}"cdtest-main.c.o "{o}"cdtest-func.c.o "{o}"cdtest-foo.c.o {HOSTING_LIBS}
454
455 check-cdtest \Option-f cdtest "{srcdir}"cdtest.exp
456 :cdtest "{o}">cdtest.c.out
457 diff "{srcdir}"cdtest.exp "{o}"cdtest.c.out
458
459 # .PHONY \Option-f check-cdtest
460
461 # END OF CHECK TARGETS
462
463 # DOCUMENTATION TARGETS
464 # Manual configuration file; not usually attached to normal configuration,
465 # because almost all configs use "gen" version of manual.
466 # Set DOCVER above to change.
467 configdoc.texi \Option-f {DOCVER}-doc.texi
468 # ln -s "{srcdir}"{DOCVER}-doc.texi :configdoc.texi || \Option-d
469 # ln "{srcdir}"{DOCVER}-doc.texi :configdoc.texi || \Option-d
470 Duplicate -d -y "{srcdir}"{DOCVER}-doc.texi :configdoc.texi
471
472 # TeX output
473 dvi \Option-f ld.dvi
474 ld.dvi \Option-f "{srcdir}"ld.texinfo "{srcdir}"configdoc.texi {BFDDIR}:doc:bfdsumm.texi
475 TEXINPUTS={BFDDIR}:doc \Option-f $$TEXINPUTS {TEXI2DVI} "{srcdir}"ld.texinfo
476
477 ldint.dvi \Option-f "{srcdir}"ldint.texinfo
478 {TEXI2DVI} "{srcdir}"ldint.texinfo
479
480 # info file for online browsing
481 ld.info \Option-f "{srcdir}"ld.texinfo configdoc.texi {BFDDIR}:doc:bfdsumm.texi
482 {MAKEINFO} -i {BFDDIR}:doc -o ld.info "{srcdir}"ld.texinfo
483
484 ldint.info \Option-f "{srcdir}"ldint.texinfo
485 {MAKEINFO} -o ldint.info "{srcdir}"ldint.texinfo
486
487 # .PHONY \Option-f dvi
488
489 #separate targets for "ms", "me", and "mm" forms of roff doc
490 # Try to use a recent texi2roff. v2 was put on prep in jan91.
491 # If you want an index, see texi2roff doc for postprocessing
492 # and add -i to texi2roff invocations below.
493 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
494 # correspondint -e lines when later texi2roff's are current)
495 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
496 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
497 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
498 # + @alphaenumerate is ridiculously new, turned into @enumerate
499
500 ld.ms \Option-f "{srcdir}"ld.texinfo
501 sed -e ':\\input texinfo:d' \Option-d
502 e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d
503 e ':^end ifinfo:d' \Option-d
504 e ':^@c:d' \Option-d
505 e 's:{.\Option-x,,:{:' \Option-d
506 e 's:@ : :g' \Option-d
507 e 's:^enumerate:g' \Option-d
508 e 's:^@end alphaenumerate:@end enumerate:g' \Option-d
509 "{srcdir}"ld.texinfo | \Option-d
510 {TEXI2ROFF} {TEXI2OPT} -ms | \Option-d
511 sed -e 's:---:\\(em:g' \Option-d
512 >>ld.ms
513
514 # index for roff output
515 ld-index.ms \Option-f ld.ms
516 {ROFF} -ms ld.ms 2>&1 1>:dev:null | \Option-d
517 sed -e ': \Option-f warning \Option-f :d' | \Option-d
518 texi2index >ld-index.ms
519
520 # roff output (-mm)
521 ld.mm \Option-f "{srcdir}"ld.texinfo
522 sed -e ':\\input texinfo:d' \Option-d
523 e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d
524 e ':^end ifinfo:d' \Option-d
525 e ':^@c:d' \Option-d
526 e 's:{.\Option-x,,:{:' \Option-d
527 e ':@noindent:d' \Option-d
528 e 's:@ : :g' \Option-d
529 e 's:^enumerate:g' \Option-d
530 e 's:^@end alphaenumerate:@end enumerate:g' \Option-d
531 "{srcdir}"ld.texinfo | \Option-d
532 {TEXI2ROFF} {TEXI2OPT} -mm | \Option-d
533 sed -e 's:---:\\(em:g' \Option-d
534 >ld.mm
535
536 # index for roff output
537 ld-index.mm \Option-f ld.mm
538 {ROFF} -mm ld.mm 2>&1 1>:dev:null | \Option-d
539 sed -e ': \Option-f warning \Option-f :d' | \Option-d
540 texi2index >ld-index.mm
541
542 # roff output (-me)
543 ld.me \Option-f "{srcdir}"ld.texinfo
544 sed -e ':\\input texinfo:d' \Option-d
545 e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d
546 e ':^end ifinfo:d' \Option-d
547 e ':^@c:d' \Option-d
548 e 's:{.\Option-x,,:{:' \Option-d
549 e 's:@ : :g' \Option-d
550 e 's:^enumerate:g' \Option-d
551 e 's:^@end alphaenumerate:@end enumerate:g' \Option-d
552 "{srcdir}"ld.texinfo | \Option-d
553 {TEXI2ROFF} {TEXI2OPT} -me | \Option-d
554 sed -e 's:---:\\(em:g' \Option-d
555 >>ld.me
556
557 # index for roff output
558 ld-index.me \Option-f ld.me
559 {ROFF} -me ld.me 2>&1 1>:dev:null | \Option-d
560 sed -e ': \Option-f warning \Option-f :d' | \Option-d
561 texi2index >ld-index.me
562
563 stage1 \Option-f force
564 mkdir stage1
565 Rename -y {STAGESTUFF} {LD_PROG} stage1
566 (cd stage1 ; ln -s {LD_PROG} ld)
567
568 stage2 \Option-f force
569 mkdir stage2
570 Rename -y {STAGESTUFF} {LD_PROG} stage2
571 (cd stage2 ; ln -s {LD_PROG} ld)
572
573 stage3 \Option-f force
574 mkdir stage3
575 Rename -y {STAGESTUFF} {LD_PROG} stage3
576 (cd stage3 ; ln -s {LD_PROG} ld)
577
578 against = stage2
579
580 comparison \Option-f force
581 for i in {STAGESTUFF} {LD_PROG} ; do cmp $$i {against}:$$i ; done
582
583 de-stage1 \Option-f force
584 (cd stage1 ; mv -f \Option-x ..)
585 Delete -y ld
586 rmdir stage1
587
588 de-stage2 \Option-f force
589 (cd stage2 ; mv -f \Option-x ..)
590 Delete -y ld
591 rmdir stage2
592
593 de-stage3 \Option-f force
594 (cd stage3 ; mv -f \Option-x ..)
595 Delete -y ld
596 rmdir stage3
597
598 # .PHONY \Option-f stage1 stage2 stage3 comparison de-stage1 de-stage2 de-stage3
599
600 # Stuff that should be included in a distribution \Option-f
601 LDDISTSTUFF = :ldgram.c :ldgram.h :ldlex.c
602 diststuff \Option-f {LDDISTSTUFF}
603
604 mostlyclean \Option-f
605 Delete -y {STAGESTUFF} ld.?? ld.??? ldlex.[qp]
606 Delete -y ld ld1 ld2 ld3 "{o}"\Option-x.c.o "{o}"y.c.output cdtest "{o}"cdtest.c.out
607 clean \Option-f mostlyclean
608 Delete -y {LD_PROG}
609 distclean \Option-f
610 Delete -yr Makefile config.status TAGS "{s}"sysdep.h ldscripts site.exp \Option-d
611 {STAGESTUFF} ld.?? ld.??s ld.toc ld.aux "{s}"ld.log ldlex.[qp] \Option-d
612 {LD_PROG} ld ld1 ld2 ld3 "{o}"\Option-x.c.o "{o}"y.c.output cdtest "{o}"cdtest.c.out
613 realclean \Option-f clean distclean
614 Delete -y {LDDISTSTUFF}
615
616 # .PHONY \Option-f diststuff mostlyclean clean distclean realclean
617
618
619
620 TAGS \Option-f
621 etags -t "{srcdir}"\Option-x.[chly] \Option-x.[chly]
622
623
624 install \Option-f
625 {INSTALL_XFORM} ld.new {bindir}:ld
626 {INSTALL_XFORM1} "{srcdir}"ld.1 {man1dir}:ld.1
627 for f in ldscripts:\Option-x; do \Option-d
628 {INSTALL_DATA} $$f {scriptdir}:$$f ; \Option-d
629 done
630 n=`t='{program_transform_name}'; echo ld | sed -e "" $$t`; \Option-d
631 Delete -y {tooldir}:bin:ld; \Option-d
632 # ln {bindir}:$$n {tooldir}:bin:ld \Option-d
633 || {INSTALL_PROGRAM} ld.new {tooldir}:bin:ld
634
635 install-info \Option-f
636 for i in ld.info\Option-x ; do \Option-d
637 {INSTALL_DATA} $$i {infodir}:$$i ; \Option-d
638 done
639
640 clean-info \Option-f
641 Delete -y -rf \Option-x.info\Option-x
642
643 # .PHONY \Option-f install install-info clean-info
644
645 # Targets to rebuild dependencies in this Makefile.
646 # Have to get rid of .dep1 here so that "$?" later includes all of {CFILES}.
647
648 # Dummy target to force execution of dependent targets.
649 #
650 force \Option-f
651
652 # .PHONY \Option-f force
653
654 Makefile \Option-f "{srcdir}"Makefile.in {host_makefile_frag} {target_makefile_frag}
655 {SHELL} :config.status
656
657 # What appears below is generated by a hacked mkdep using gcc -MM.
658
659 # DO NOT DELETE THIS LINE -- mkdep uses it.
660 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
661
662 "{o}"ldctor.c.o \Option-f "{s}"ldctor.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
663 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
664 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldmisc.h \Option-d
665 :ldgram.h "{s}"ldctor.h
666 "{o}"ldemul.c.o \Option-f "{s}"ldemul.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
667 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
668 "{s}"config.h "{s}"ld.h "{s}"ldemul.h "{s}"ldmisc.h "{s}"ldfile.h "{s}"ldmain.h :ldemul-list.h
669 "{o}"ldexp.c.o \Option-f "{s}"ldexp.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
670 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
671 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldmain.h "{s}"ldmisc.h "{s}"ldexp.h \Option-d
672 :ldgram.h "{s}"ldlang.h
673 "{o}"ldfile.c.o \Option-f "{s}"ldfile.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
674 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
675 "{s}"ld.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldfile.h "{s}"ldmain.h "{s}"ldlex.h
676 "{o}"ldlang.c.o \Option-f "{s}"ldlang.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
677 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
678 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldmain.h :ldgram.h "{s}"ldexp.h \Option-d
679 "{s}"ldlang.h "{s}"ldemul.h "{s}"ldlex.h "{s}"ldmisc.h "{s}"ldctor.h "{s}"ldfile.h
680 "{o}"ldmain.c.o \Option-f "{s}"ldmain.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
681 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
682 "{INCDIR}":bfdlink.h "{s}"config.h "{s}"ld.h "{s}"ldmain.h "{s}"ldmisc.h \Option-d
683 "{s}"ldwrite.h :ldgram.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldemul.h "{s}"ldlex.h \Option-d
684 "{s}"ldfile.h "{s}"ldctor.h
685 "{o}"ldmisc.c.o \Option-f "{s}"ldmisc.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
686 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
687 "{s}"ld.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldlex.h "{s}"ldmain.h "{s}"ldfile.h
688 "{o}"ldver.c.o \Option-f "{s}"ldver.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}"ldver.h "{s}"ldemul.h "{s}"ldmain.h
691 "{o}"ldwrite.c.o \Option-f "{s}"ldwrite.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
692 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
693 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldwrite.h \Option-d
694 "{s}"ldmisc.h :ldgram.h "{s}"ldmain.h
695 "{o}"lexsup.c.o \Option-f "{s}"lexsup.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
696 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
697 "{s}"ldlex.h "{s}"ld.h "{s}"ldexp.h :ldgram.h "{s}"ldmisc.h
698 "{o}"mri.c.o \Option-f "{s}"mri.c ::bfd:bfd.h "{INCDIR}":ansidecl.h "{INCDIR}":obstack.h \Option-d
699 ::bfd:sysdep.h "{INCDIR}":fopen-same.h "{s}"ld.h "{s}"ldexp.h \Option-d
700 "{s}"ldlang.h "{s}"ldmisc.h "{s}"mri.h :ldgram.h
701 "{o}"ldgram.c.o \Option-f :ldgram.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
702 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
703 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldexp.h "{s}"ldver.h "{s}"ldlang.h "{s}"ldemul.h \Option-d
704 "{s}"ldfile.h "{s}"ldmisc.h "{s}"ldmain.h "{s}"mri.h "{s}"ldlex.h
705 "{o}"ldlex.c.o \Option-f :ldlex.c ::bfd:bfd.h "{INCDIR}":obstack.h \Option-d
706 "{s}"ld.h :ldgram.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldfile.h "{s}"ldlex.h
707
708 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.043585 seconds and 4 git commands to generate.