* ldmain.c (main): Initialize new field link_info.static_link.
[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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 = byacc
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}"elnk960.c.o "{o}"esun3.c.o "{o}"ei386aout.c.o "{o}"ego32.c.o "{o}"evsta.c.o \Option-d
182 "{o}"em88kbcs.c.o "{o}"ea29k.c.o "{o}"enews.c.o "{o}"ehp300bsd.c.o "{o}"ehp3hpux.c.o \Option-d
183 "{o}"eh8300.c.o "{o}"eh8300h.c.o "{o}"eebmon29k.c.o "{o}"esun4.c.o "{o}"egld960.c.o \Option-d
184 "{o}"em68kcoff.c.o "{o}"est2000.c.o "{o}"esa29200.c.o "{o}"ei386mach.c.o \Option-d
185 "{o}"evanilla.c.o "{o}"ei386coff.c.o "{o}"ez8ksim.c.o "{o}"emipslit.c.o "{o}"ei386bsd.c.o \Option-d
186 "{o}"emipsbig.c.o "{o}"emipsbsd.c.o "{o}"emipsidt.c.o "{o}"evax.c.o "{o}"eh8500.c.o \Option-d
187 "{o}"ehppaosf.c.o "{o}"emipsidtl.c.o "{o}"esh.c.o "{o}"eelf_i386.c.o "{o}"ealpha.c.o \Option-d
188 "{o}"ei386lynx.c.o "{o}"em68klynx.c.o "{o}"esparclynx.c.o "{o}"ecoff_sparc.c.o \Option-d
189 "{o}"edelta68.c.o \Option-d
190 {OTHER_EMULATIONS}
191
192 CFILES = "{s}"ldctor.c "{s}"ldemul.c "{s}"ldexp.c "{s}"ldfile.c "{s}"ldlang.c \Option-d
193 ldmain.c "{s}"ldmisc.c "{s}"ldver.c "{s}"ldwrite.c "{s}"lexsup.c \Option-d
194 mri.c
195
196
197 HFILES = "{s}"config.h "{s}"ld.h "{s}"ldctor.h "{s}"ldemul.h "{s}"ldexp.h "{s}"ldfile.h \Option-d
198 ldlang.h "{s}"ldlex.h "{s}"ldmain.h "{s}"ldmisc.h "{s}"ldver.h \Option-d
199 ldwrite.h "{s}"mri.h
200
201 GENERATED_CFILES = :ldgram.c :ldlex.c
202 GENERATED_HFILES = :ldgram.h :ldemul-list.h
203
204 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
205 "{o}"ldwrite.c.o "{o}"ldexp.c.o "{o}"ldemul.c.o "{o}"ldver.c.o "{o}"ldmisc.c.o \Option-d
206 "{o}"ldfile.c.o {EMULATION_OFILES}
207
208 LINTSOURCES = {CFILES} {GENERATED_CFILES} e\Option-x.c
209
210 STAGESTUFF = "{o}"\Option-x.c.o ldscripts:\Option-x e\Option-x.c {GENERATED_CFILES} {GENERATED_HFILES}
211
212 info \Option-f ld.info
213 # .PHONY \Option-f info
214
215 :ldgram.c \Option-f "{s}"ldgram.y
216 {BISON} {BISONFLAGS} -d "{srcdir}"ldgram.y
217 Rename -y y.tab.c :ldgram.c
218 Rename -y y.tab.h :ldgram.h
219
220 # Separate from ldgram.c so that a parallel make doesn't try to build
221 # both ldgram.c and ldgram.h simultaneously.
222 :ldgram.h \Option-f :ldgram.c
223
224 # EMUL is the name of a file in the emulparams subdir, without the .sh.
225 "{o}"ldmain.c.o \Option-f "{s}"ldmain.c config.status
226 {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
227
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
232 Delete -y :lex.yy.c
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
236
237 # These all start with e so 'make clean' can find them.
238
239 GENSCRIPTS = {SHELL} "{srcdir}"genscripts.sh {srcdir} {libdir} {host_alias} {target_alias} {EMUL} "{NATIVE_LIB_DIRS}"
240 GEN_DEPENDS = "{srcdir}"genscripts.sh
241
242 esun4.c \Option-f "{srcdir}"emulparams:sun4.sh \Option-d
243 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
244 {GENSCRIPTS} sun4
245 esun3.c \Option-f "{srcdir}"emulparams:sun3.sh \Option-d
246 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
247 {GENSCRIPTS} sun3
248 evsta.c \Option-f "{srcdir}"emulparams:vsta.sh \Option-d
249 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
250 {GENSCRIPTS} vsta
251 ego32.c \Option-f "{srcdir}"emulparams:go32.sh \Option-d
252 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
253 {GENSCRIPTS} go32
254 enews.c \Option-f "{srcdir}"emulparams:news.sh \Option-d
255 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
256 {GENSCRIPTS} news
257 evax.c \Option-f "{srcdir}"emulparams:vax.sh \Option-d
258 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
259 {GENSCRIPTS} vax
260 ehp300bsd.c \Option-f "{srcdir}"emulparams:hp300bsd.sh \Option-d
261 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
262 {GENSCRIPTS} hp300bsd
263 ehp3hpux.c \Option-f "{srcdir}"emulparams:hp3hpux.sh \Option-d
264 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
265 {GENSCRIPTS} hp3hpux
266 ehppaosf.c \Option-f "{srcdir}"emulparams:hppaosf.sh \Option-d
267 "{srcdir}"emultempl:hppaosf.em "{srcdir}"scripttempl:hppaosf.sc {GEN_DEPENDS}
268 {GENSCRIPTS} hppaosf
269 ei386aout.c \Option-f "{srcdir}"emulparams:i386aout.sh \Option-d
270 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
271 {GENSCRIPTS} i386aout
272 ei386mach.c \Option-f "{srcdir}"emulparams:i386mach.sh \Option-d
273 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
274 {GENSCRIPTS} i386mach
275 eebmon29k.c \Option-f "{srcdir}"emulparams:ebmon29k.sh \Option-d
276 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:ebmon29k.sc {GEN_DEPENDS}
277 {GENSCRIPTS} ebmon29k
278 esa29200.c \Option-f "{srcdir}"emulparams:sa29200.sh \Option-d
279 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sa29200.sc {GEN_DEPENDS}
280 {GENSCRIPTS} sa29200
281 ea29k.c \Option-f "{srcdir}"emulparams:a29k.sh \Option-d
282 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:a29k.sc {GEN_DEPENDS}
283 {GENSCRIPTS} a29k
284 em88kbcs.c \Option-f "{srcdir}"emulparams:m88kbcs.sh \Option-d
285 "{srcdir}"emultempl:m88kbcs.em "{srcdir}"scripttempl:m88kbcs.sc {GEN_DEPENDS}
286 {GENSCRIPTS} m88kbcs
287 eh8300.c \Option-f "{srcdir}"emulparams:h8300.sh \Option-d
288 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:h8300.sc {GEN_DEPENDS}
289 {GENSCRIPTS} h8300
290 eh8300h.c \Option-f "{srcdir}"emulparams:h8300h.sh \Option-d
291 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:h8300h.sc {GEN_DEPENDS}
292 {GENSCRIPTS} h8300h
293 eh8500.c \Option-f "{srcdir}"emulparams:h8500.sh \Option-d
294 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:h8500.sc {GEN_DEPENDS}
295 {GENSCRIPTS} h8500
296 esh.c \Option-f "{srcdir}"emulparams:sh.sh \Option-d
297 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sh.sc {GEN_DEPENDS}
298 {GENSCRIPTS} sh
299 est2000.c \Option-f "{srcdir}"emulparams:st2000.sh \Option-d
300 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:st2000.sc {GEN_DEPENDS}
301 {GENSCRIPTS} st2000
302 ez8ksim.c \Option-f "{srcdir}"emulparams:z8ksim.sh \Option-d
303 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:z8ksim.sc {GEN_DEPENDS}
304 {GENSCRIPTS} z8ksim
305 evanilla.c \Option-f "{srcdir}"emulparams:vanilla.sh \Option-d
306 "{srcdir}"emultempl:vanilla.em "{srcdir}"scripttempl:vanilla.sc {GEN_DEPENDS}
307 {GENSCRIPTS} vanilla
308 elnk960.c \Option-f "{srcdir}"emulparams:lnk960.sh \Option-d
309 "{srcdir}"emultempl:lnk960.em "{srcdir}"scripttempl:i960.sc {GEN_DEPENDS}
310 {GENSCRIPTS} lnk960
311 egld960.c \Option-f "{srcdir}"emulparams:gld960.sh \Option-d
312 "{srcdir}"emultempl:gld960.em "{srcdir}"scripttempl:i960.sc {GEN_DEPENDS}
313 {GENSCRIPTS} gld960
314 em68kcoff.c \Option-f "{srcdir}"emulparams:m68kcoff.sh \Option-d
315 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:m68kcoff.sc {GEN_DEPENDS}
316 {GENSCRIPTS} m68kcoff
317 edelta68.c \Option-f "{srcdir}"emulparams:delta68.sh \Option-d
318 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:delta68.sc {GEN_DEPENDS}
319 {GENSCRIPTS} delta68
320 em68klynx.c \Option-f "{srcdir}"emulparams:m68klynx.sh \Option-d
321 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:m68kcoff.sc {GEN_DEPENDS}
322 {GENSCRIPTS} m68klynx
323 ei386coff.c \Option-f "{srcdir}"emulparams:i386coff.sh \Option-d
324 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:i386coff.sc {GEN_DEPENDS}
325 {GENSCRIPTS} i386coff
326 ei386lynx.c \Option-f "{srcdir}"emulparams:i386lynx.sh \Option-d
327 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:i386coff.sc {GEN_DEPENDS}
328 {GENSCRIPTS} i386lynx
329 esparclynx.c \Option-f "{srcdir}"emulparams:sparclynx.sh \Option-d
330 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:sparccoff.sc {GEN_DEPENDS}
331 {GENSCRIPTS} sparclynx
332 emipslit.c \Option-f "{srcdir}"emulparams:mipslit.sh \Option-d
333 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
334 {GENSCRIPTS} mipslit
335 ei386bsd.c \Option-f "{srcdir}"emulparams:i386bsd.sh \Option-d
336 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
337 {GENSCRIPTS} i386bsd
338 emipsbig.c \Option-f "{srcdir}"emulparams:mipsbig.sh \Option-d
339 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
340 {GENSCRIPTS} mipsbig
341 emipsbsd.c \Option-f "{srcdir}"emulparams:mipsbsd.sh \Option-d
342 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:aout.sc {GEN_DEPENDS}
343 {GENSCRIPTS} mipsbsd
344 emipsidt.c \Option-f "{srcdir}"emulparams:mipsidt.sh \Option-d
345 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
346 {GENSCRIPTS} mipsidt
347 emipsidtl.c \Option-f "{srcdir}"emulparams:mipsidtl.sh \Option-d
348 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:mips.sc {GEN_DEPENDS}
349 {GENSCRIPTS} mipsidtl
350 eelf_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 eelf32mipb.c \Option-f "{srcdir}"emulparams:elf32mipb.sh \Option-d
354 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:elf.sc {GEN_DEPENDS}
355 {GENSCRIPTS} elf32mipb
356 ealpha.c \Option-f "{srcdir}"emulparams:alpha.sh \Option-d
357 "{srcdir}"emultempl:generic.em "{srcdir}"scripttempl:alpha.sc {GEN_DEPENDS}
358 {GENSCRIPTS} alpha
359 ecoff_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
362
363 {LD_PROG} \Option-f {OFILES} {BFDLIB} {LIBIBERTY} "{o}"Version.r
364 Rez -rd -o {LD_PROG} "{o}"Version.r -append
365 Link {LDFLAGS} -o {LD_PROG} {OFILES} {BFDLIB} {LIBIBERTY} {EXTRALIBS}
366
367 "{o}"Version.r \Option-f "{o}"version-stamp
368
369 "{o}"version-stamp \Option-f Makefile
370 Delete -i -y "{o}"version.new "{o}"version-stamp
371 Set major `Search 'ld version ' {srcdir}ldver.c | sed -e 's/.*ld version [^0-9]*\([0-9]*\)\.\([0-9]*\)\..*/\1/'`
372 Set minor `Search 'ld version ' {srcdir}ldver.c | sed -e 's/.*ld version [^0-9]*\([0-9]*\)\.\([0-9]*\)\..*/\2/'`
373 Set release 0
374 Echo '/* Version resources. */' > "{o}"version.new
375 Echo '#include "SysTypes.r"' >> "{o}"version.new
376 Echo '' >> "{o}"version.new
377 Echo "resource 'vers' (1) " `open-brace` >> "{o}"version.new
378 Echo " {major}," >> "{o}"version.new
379 Echo " {minor}," >> "{o}"version.new
380 Echo " {release}," >> "{o}"version.new
381 Echo ' 0,' >> "{o}"version.new
382 Echo ' verUs,' >> "{o}"version.new
383 Echo ' "{version}",' >> "{o}"version.new
384 Echo ' "{version} (c) 1986-95 FSF, Inc. "' >> "{o}"version.new
385 Echo '};' >> "{o}"version.new
386 Echo '' >> "{o}"version.new
387 Echo "resource 'vers' (2, purgeable) " `open-brace` >> "{o}"version.new
388 Echo " {major}," >> "{o}"version.new
389 Echo " {minor}," >> "{o}"version.new
390 Echo " {release}," >> "{o}"version.new
391 Echo ' 0,' >> "{o}"version.new
392 Echo ' verUs,' >> "{o}"version.new
393 Echo ' "{version}",' >> "{o}"version.new
394 Echo ' "GNU LD for MPW"' >> "{o}"version.new
395 Echo '};' >> "{o}"version.new
396 MoveIfChange "{o}"version.new "{o}"Version.r
397 Echo ' ' > "{o}"version-stamp
398
399 # The generated emulation files mostly have the same dependencies.
400 {EMULATION_OFILES} \Option-f ::bfd:bfd.h ::bfd:sysdep.h "{INCDIR}":bfdlink.h \Option-d
401 "{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
402
403 # These targets are for the dejagnu testsuites. The file site.exp
404 # contains global variables that all the testsuites will use.
405 # There is a current debate as to how and where to generate test
406 # outputs. Rob feels each test should be built in {objdir} with
407 # a unique name. Cassidy feels that we should create a directory
408 # called {objdir}:tmpdir and do the work there. This way, there
409 # is no potential conflict with existing objects, ie \Option-f as there
410 # was in the past with "{o}"loop.c.o and "{o}"flow.c.o, and, there is no chance
411 # of filling :tmp, which would cause other problems. Lastly, this
412 # allow retention of the testcase name making debugging easier.
413 #
414 testdir = {objdir}:tmpdir
415
416 site.exp \Option-f :config.status Makefile
417 @if [ -d {testdir} ]; then true; else mkdir {testdir}; fi
418 @echo "Making a new config file..."
419 @rm -f :tmp?
420 @touch site.exp
421 @mv site.exp site.bak
422 @echo "## variables are automatically generated by make ##" > :tmp0
423 @echo "# Do not edit here. If you wish to override these" >> :tmp0
424 @echo "# values, add them to the last section" >> :tmp0
425 @echo "# HOST AND TARGET INFO" >> :tmp0
426 @echo "set host_os {host_os}" >> :tmp0
427 @echo "set host_alias {host_alias}" >> :tmp0
428 @echo "set host_cpu {host_cpu}" >> :tmp0
429 @echo "set host_vendor {host_vendor}" >> :tmp0
430 @echo "set target_os {target_os}" >> :tmp0
431 @echo "set target_alias {target_alias}" >> :tmp0
432 @echo "set target_cpu {target_cpu}" >> :tmp0
433 @echo "set target_vendor {target_vendor}" >> :tmp0
434 @echo "set host_triplet {host_canonical}" >> :tmp0
435 @echo "set target_triplet {target_canonical}" >> :tmp0
436 @echo "# DIRECTORY INFO" >> :tmp0
437 @echo "set objdir `pwd`" >> :tmp0
438 @echo "set tmpdir `cd {testdir}; pwd`" >> :tmp0
439 @echo "" >> :tmp0
440 @echo "# LD DEPENDANCIES" >> :tmp0
441 @echo "set OFILES \"{OFILES}\"" >> :tmp0
442 @echo "set BFDLIB \"{BFDLIB}\"" >> :tmp0
443 @echo "set LIBIBERTY \"{LIBIBERTY}\"" >> :tmp0
444 @echo "set HOSTING_EMU \"{HOSTING_EMU}\"" >> :tmp0
445 @echo "set HOSTING_CRT0 \"{HOSTING_CRT0}\"" >> :tmp0
446 @echo "set HOSTING_LIBS \"{HOSTING_LIBS}\"" >> :tmp0
447 @echo "" >> :tmp0
448 @echo "## Variables generated by configure. Do Not Edit ##" >> :tmp0
449 @cat :tmp0 > site.exp
450 @cat site.bak | sed \Option-d
451 e '1,:^## Variables generated by.\Option-x##: d' >> site.exp
452 @rm -f :tmp?
453
454 check \Option-f ld.new site.exp
455 {RUNTEST} --tool ld \Option-d
456 -srcdir "{srcdir}"testsuite {RUNTEST_FLAGS} \Option-d
457 CC="{RUNTEST_CC}" CFLAGS="{RUNTEST_CFLAGS}" \Option-d
458 CXX="{RUNTEST_CXX}" CXXFLAGS="{RUNTEST_CXXFLAGS}"
459
460 installcheck \Option-f
461 # .PHONY \Option-f check installcheck
462
463 # Rules for testing by relinking ld itself.
464
465 "{o}"ld-partial.c.o \Option-f ld.new
466 :ld.new {HOSTING_EMU} -o "{o}"ld-partial.c.o -r {OFILES}
467 ld1 \Option-f "{o}"ld-partial.c.o
468 :ld.new {HOSTING_EMU} -o ld1 {HOSTING_CRT0} "{o}"ld-partial.c.o {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
469
470 ld1-full \Option-f ld.new
471 :ld.new {HOSTING_EMU} -o ld1-full {HOSTING_CRT0} {OFILES} {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
472
473 ld2 \Option-f ld1
474 :ld1 {HOSTING_EMU} -o ld2 {HOSTING_CRT0} {OFILES} {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
475
476 ld3 \Option-f ld2
477 :ld2 {HOSTING_EMU} -o ld3 {HOSTING_CRT0} {OFILES} {BFDLIB} {LIBIBERTY} {HOSTING_LIBS}
478
479 bootstrap \Option-f ld3
480 cmp ld2 ld3
481
482 # .PHONY \Option-f bootstrap
483
484 # A test program for C++ constructors and destructors.
485
486 cdtest \Option-f "{o}"cdtest-main.c.o "{o}"cdtest-func.c.o "{o}"cdtest-foo.c.o ld.new
487 :ld.new {HOSTING_EMU} -o cdtest {HOSTING_CRT0} \Option-d
488 "{o}"cdtest-main.c.o "{o}"cdtest-func.c.o "{o}"cdtest-foo.c.o {HOSTING_LIBS}
489
490 check-cdtest \Option-f cdtest "{srcdir}"cdtest.exp
491 :cdtest "{o}">cdtest.c.out
492 diff "{srcdir}"cdtest.exp "{o}"cdtest.c.out
493
494 # .PHONY \Option-f check-cdtest
495
496 # END OF CHECK TARGETS
497
498 # DOCUMENTATION TARGETS
499 # Manual configuration file; not usually attached to normal configuration,
500 # because almost all configs use "gen" version of manual.
501 # Set DOCVER above to change.
502 configdoc.texi \Option-f {DOCVER}-doc.texi
503 # ln -s "{srcdir}"{DOCVER}-doc.texi :configdoc.texi || \Option-d
504 # ln "{srcdir}"{DOCVER}-doc.texi :configdoc.texi || \Option-d
505 Duplicate -d -y "{srcdir}"{DOCVER}-doc.texi :configdoc.texi
506
507 # TeX output
508 dvi \Option-f ld.dvi
509 ld.dvi \Option-f "{srcdir}"ld.texinfo "{srcdir}"configdoc.texi {BFDDIR}:doc:bfdsumm.texi
510 TEXINPUTS={BFDDIR}:doc \Option-f $$TEXINPUTS {TEXI2DVI} "{srcdir}"ld.texinfo
511
512 ldint.dvi \Option-f "{srcdir}"ldint.texinfo
513 {TEXI2DVI} "{srcdir}"ldint.texinfo
514
515 # info file for online browsing
516 ld.info \Option-f "{srcdir}"ld.texinfo configdoc.texi {BFDDIR}:doc:bfdsumm.texi
517 {MAKEINFO} -i {BFDDIR}:doc -o ld.info "{srcdir}"ld.texinfo
518
519 ldint.info \Option-f "{srcdir}"ldint.texinfo
520 {MAKEINFO} -o ldint.info "{srcdir}"ldint.texinfo
521
522 # .PHONY \Option-f dvi
523
524 #separate targets for "ms", "me", and "mm" forms of roff doc
525 # Try to use a recent texi2roff. v2 was put on prep in jan91.
526 # If you want an index, see texi2roff doc for postprocessing
527 # and add -i to texi2roff invocations below.
528 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
529 # correspondint -e lines when later texi2roff's are current)
530 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
531 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
532 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
533 # + @alphaenumerate is ridiculously new, turned into @enumerate
534
535 ld.ms \Option-f "{srcdir}"ld.texinfo
536 sed -e ':\\input texinfo:d' \Option-d
537 e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d
538 e ':^end ifinfo:d' \Option-d
539 e ':^@c:d' \Option-d
540 e 's:{.\Option-x,,:{:' \Option-d
541 e 's:@ : :g' \Option-d
542 e 's:^enumerate:g' \Option-d
543 e 's:^@end alphaenumerate:@end enumerate:g' \Option-d
544 "{srcdir}"ld.texinfo | \Option-d
545 {TEXI2ROFF} {TEXI2OPT} -ms | \Option-d
546 sed -e 's:---:\\(em:g' \Option-d
547 >>ld.ms
548
549 # index for roff output
550 ld-index.ms \Option-f ld.ms
551 {ROFF} -ms ld.ms 2>&1 1>:dev:null | \Option-d
552 sed -e ': \Option-f warning \Option-f :d' | \Option-d
553 texi2index >ld-index.ms
554
555 # roff output (-mm)
556 ld.mm \Option-f "{srcdir}"ld.texinfo
557 sed -e ':\\input texinfo:d' \Option-d
558 e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d
559 e ':^end ifinfo:d' \Option-d
560 e ':^@c:d' \Option-d
561 e 's:{.\Option-x,,:{:' \Option-d
562 e ':@noindent:d' \Option-d
563 e 's:@ : :g' \Option-d
564 e 's:^enumerate:g' \Option-d
565 e 's:^@end alphaenumerate:@end enumerate:g' \Option-d
566 "{srcdir}"ld.texinfo | \Option-d
567 {TEXI2ROFF} {TEXI2OPT} -mm | \Option-d
568 sed -e 's:---:\\(em:g' \Option-d
569 >ld.mm
570
571 # index for roff output
572 ld-index.mm \Option-f ld.mm
573 {ROFF} -mm ld.mm 2>&1 1>:dev:null | \Option-d
574 sed -e ': \Option-f warning \Option-f :d' | \Option-d
575 texi2index >ld-index.mm
576
577 # roff output (-me)
578 ld.me \Option-f "{srcdir}"ld.texinfo
579 sed -e ':\\input texinfo:d' \Option-d
580 e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d
581 e ':^end ifinfo:d' \Option-d
582 e ':^@c:d' \Option-d
583 e 's:{.\Option-x,,:{:' \Option-d
584 e 's:@ : :g' \Option-d
585 e 's:^enumerate:g' \Option-d
586 e 's:^@end alphaenumerate:@end enumerate:g' \Option-d
587 "{srcdir}"ld.texinfo | \Option-d
588 {TEXI2ROFF} {TEXI2OPT} -me | \Option-d
589 sed -e 's:---:\\(em:g' \Option-d
590 >>ld.me
591
592 # index for roff output
593 ld-index.me \Option-f ld.me
594 {ROFF} -me ld.me 2>&1 1>:dev:null | \Option-d
595 sed -e ': \Option-f warning \Option-f :d' | \Option-d
596 texi2index >ld-index.me
597
598 stage1 \Option-f force
599 mkdir stage1
600 Rename -y {STAGESTUFF} {LD_PROG} stage1
601 (cd stage1 ; ln -s {LD_PROG} ld)
602
603 stage2 \Option-f force
604 mkdir stage2
605 Rename -y {STAGESTUFF} {LD_PROG} stage2
606 (cd stage2 ; ln -s {LD_PROG} ld)
607
608 stage3 \Option-f force
609 mkdir stage3
610 Rename -y {STAGESTUFF} {LD_PROG} stage3
611 (cd stage3 ; ln -s {LD_PROG} ld)
612
613 against = stage2
614
615 comparison \Option-f force
616 for i in {STAGESTUFF} {LD_PROG} ; do cmp $$i {against}:$$i ; done
617
618 de-stage1 \Option-f force
619 (cd stage1 ; mv -f \Option-x ..)
620 Delete -y ld
621 rmdir stage1
622
623 de-stage2 \Option-f force
624 (cd stage2 ; mv -f \Option-x ..)
625 Delete -y ld
626 rmdir stage2
627
628 de-stage3 \Option-f force
629 (cd stage3 ; mv -f \Option-x ..)
630 Delete -y ld
631 rmdir stage3
632
633 # .PHONY \Option-f stage1 stage2 stage3 comparison de-stage1 de-stage2 de-stage3
634
635 # Stuff that should be included in a distribution \Option-f
636 LDDISTSTUFF = :ldgram.c :ldgram.h :ldlex.c
637 diststuff \Option-f {LDDISTSTUFF}
638
639 mostlyclean \Option-f
640 Delete -y {STAGESTUFF} ld.?? ld.??? ldlex.[qp]
641 Delete -y ld ld1 ld2 ld3 "{o}"\Option-x.c.o "{o}"y.c.output cdtest "{o}"cdtest.c.out
642 clean \Option-f mostlyclean
643 Delete -y {LD_PROG}
644 distclean \Option-f
645 Delete -yr Makefile config.status TAGS "{s}"sysdep.h ldscripts site.exp \Option-d
646 {STAGESTUFF} ld.?? ld.??s ld.toc ld.aux "{s}"ld.log ldlex.[qp] \Option-d
647 {LD_PROG} ld ld1 ld2 ld3 "{o}"\Option-x.c.o "{o}"y.c.output cdtest "{o}"cdtest.c.out
648 realclean \Option-f clean distclean
649 Delete -y {LDDISTSTUFF}
650
651 # .PHONY \Option-f diststuff mostlyclean clean distclean realclean
652
653
654
655 TAGS \Option-f
656 etags -t "{srcdir}"\Option-x.[chly] \Option-x.[chly]
657
658
659 install \Option-f all install-only
660
661 install-only \Option-f
662 If "`Exists "{prefix}"`" == ""
663 Echo "{prefix}" does not exist, cannot install anything
664 Exit 1
665 End If
666 If "`Exists "{bindir}"`" == ""
667 NewFolder "{bindir}"
668 End If
669 Duplicate -y :ld.new "{bindir}"ld
670
671 install-info \Option-f
672 for i in ld.info\Option-x ; do \Option-d
673 {INSTALL_DATA} $$i {infodir}:$$i ; \Option-d
674 done
675
676 clean-info \Option-f
677 Delete -y -rf \Option-x.info\Option-x
678
679 # .PHONY \Option-f install install-info clean-info
680
681 # Targets to rebuild dependencies in this Makefile.
682 # Have to get rid of .dep1 here so that "$?" later includes all of {CFILES}.
683
684 # Dummy target to force execution of dependent targets.
685 #
686 force \Option-f
687
688 # .PHONY \Option-f force
689
690 Makefile \Option-f "{srcdir}"Makefile.in {host_makefile_frag} {target_makefile_frag}
691 {SHELL} :config.status
692
693 # What appears below is generated by a hacked mkdep using gcc -MM.
694
695 # DO NOT DELETE THIS LINE -- mkdep uses it.
696 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
697
698 "{o}"ldctor.c.o \Option-f "{s}"ldctor.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
699 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
700 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldmisc.h \Option-d
701 :ldgram.h "{s}"ldctor.h
702 "{o}"ldemul.c.o \Option-f "{s}"ldemul.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
703 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
704 "{s}"config.h "{s}"ld.h "{s}"ldemul.h "{s}"ldmisc.h "{s}"ldfile.h "{s}"ldmain.h :ldemul-list.h
705 "{o}"ldexp.c.o \Option-f "{s}"ldexp.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
706 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
707 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldmain.h "{s}"ldmisc.h "{s}"ldexp.h \Option-d
708 :ldgram.h "{s}"ldlang.h
709 "{o}"ldfile.c.o \Option-f "{s}"ldfile.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
710 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
711 "{s}"ld.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldfile.h "{s}"ldmain.h "{s}"ldlex.h
712 "{o}"ldlang.c.o \Option-f "{s}"ldlang.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
713 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
714 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldmain.h :ldgram.h "{s}"ldexp.h \Option-d
715 "{s}"ldlang.h "{s}"ldemul.h "{s}"ldlex.h "{s}"ldmisc.h "{s}"ldctor.h "{s}"ldfile.h
716 "{o}"ldmain.c.o \Option-f "{s}"ldmain.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
717 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
718 "{INCDIR}":bfdlink.h "{s}"config.h "{s}"ld.h "{s}"ldmain.h "{s}"ldmisc.h \Option-d
719 "{s}"ldwrite.h :ldgram.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldemul.h "{s}"ldlex.h \Option-d
720 "{s}"ldfile.h "{s}"ldctor.h
721 "{o}"ldmisc.c.o \Option-f "{s}"ldmisc.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
722 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
723 "{s}"ld.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldlex.h "{s}"ldmain.h "{s}"ldfile.h
724 "{o}"ldver.c.o \Option-f "{s}"ldver.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
725 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
726 "{s}"ld.h "{s}"ldver.h "{s}"ldemul.h "{s}"ldmain.h
727 "{o}"ldwrite.c.o \Option-f "{s}"ldwrite.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
728 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
729 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldwrite.h \Option-d
730 "{s}"ldmisc.h :ldgram.h "{s}"ldmain.h
731 "{o}"lexsup.c.o \Option-f "{s}"lexsup.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
732 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
733 "{s}"ldlex.h "{s}"ld.h "{s}"ldexp.h :ldgram.h "{s}"ldmisc.h
734 "{o}"mri.c.o \Option-f "{s}"mri.c ::bfd:bfd.h "{INCDIR}":ansidecl.h "{INCDIR}":obstack.h \Option-d
735 ::bfd:sysdep.h "{INCDIR}":fopen-same.h "{s}"ld.h "{s}"ldexp.h \Option-d
736 "{s}"ldlang.h "{s}"ldmisc.h "{s}"mri.h :ldgram.h
737 "{o}"ldgram.c.o \Option-f :ldgram.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d
738 "{INCDIR}":obstack.h ::bfd:sysdep.h "{INCDIR}":fopen-same.h \Option-d
739 "{INCDIR}":bfdlink.h "{s}"ld.h "{s}"ldexp.h "{s}"ldver.h "{s}"ldlang.h "{s}"ldemul.h \Option-d
740 "{s}"ldfile.h "{s}"ldmisc.h "{s}"ldmain.h "{s}"mri.h "{s}"ldlex.h
741 "{o}"ldlex.c.o \Option-f :ldlex.c ::bfd:bfd.h "{INCDIR}":obstack.h \Option-d
742 "{s}"ld.h :ldgram.h "{s}"ldmisc.h "{s}"ldexp.h "{s}"ldlang.h "{s}"ldfile.h "{s}"ldlex.h
743
744 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.044283 seconds and 4 git commands to generate.