Thu Jan 28 15:09:59 1993 Ian Lance Taylor (ian@cygnus.com)
[deliverable/binutils-gdb.git] / ld / Makefile.in
CommitLineData
ce4d59e2 1# Makefile for the GNU linker ld (version 2)
12fa72d4 2# Copyright (C) 1989-1992 Free Software Foundation, Inc.
ce4d59e2
SC
3
4# This file is part of GNU ld..
5
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
eb02fd64
RP
20
21srcdir = .
22
e06ba18d
PB
23prefix = /usr/local
24
0bb95ac8 25program_transform_name =
12fa72d4
SC
26exec_prefix = $(prefix)
27bindir = $(exec_prefix)/bin
28libdir = $(exec_prefix)/lib
56409445 29tooldir = $(bindir)/$(target_alias)
e06ba18d 30datadir = $(prefix)/lib
12fa72d4 31mandir = $(prefix)/man
e06ba18d
PB
32man1dir = $(mandir)/man1
33man2dir = $(mandir)/man2
34man3dir = $(mandir)/man3
35man4dir = $(mandir)/man4
36man5dir = $(mandir)/man5
37man6dir = $(mandir)/man6
38man7dir = $(mandir)/man7
39man8dir = $(mandir)/man8
40man9dir = $(mandir)/man9
12fa72d4 41infodir = $(prefix)/info
e06ba18d
PB
42includedir = $(prefix)/include
43docdir = $(datadir)/doc
44
2cbe4c5f
HS
45gcclibdir = $(libdir)/gcc/$(target_alias)
46
e06ba18d
PB
47SHELL = /bin/sh
48
49INSTALL = install -c
50INSTALL_PROGRAM = $(INSTALL)
51INSTALL_DATA = $(INSTALL)
e06ba18d
PB
52AR = ar
53AR_FLAGS = qv
77b19d3d 54CFLAGS = -g
e06ba18d
PB
55MAKEINFO = makeinfo
56RANLIB = ranlib
5ff21fa5 57HOST_CC=$(CC)
bf3acf44 58BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
2df68136 59LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
8c32cf6e 60
12fa72d4 61#version=/`./../gcc/gcc -dumpversion`
092df318 62version=
8c32cf6e 63
ee17cac9
PB
64# Seach path to override the default search path for -lfoo libraries.
65# If LIB_PATH is empty, the ones in the script (if any) are left alone.
917bffa7
PB
66# (The default is usually /lib:usr/lib:/usr/local/lib, unless building
67# a cross-linker, in which case the default is empty. See genscripts.sh.)
ee17cac9
PB
68# Otherwise, they are replaced with the ones given in LIB_PATH,
69# which may have the form: LIB_PATH=/lib:/usr/local/lib
70LIB_PATH =
71
2ee11735 72BASEDIR = ../..
d6e467b4 73INCLUDE = $(srcdir)/../include
42b5c739 74INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../bfd -I$(INCLUDE)
2ee11735 75
8073190b 76# Where to find texinfo.tex to format docn with TeX
8d317d2a
RP
77TEXIDIR = $(srcdir)/../texinfo/fsf
78
10a69a37 79# Whether to get roff to put indexing entries on stderr
954ac2ea
RP
80TEXI2OPT =
81# You neeed this to generate ld-index.ms (or .mm or .me)
82# TEXI2OPT = -i
8073190b 83
e06ba18d
PB
84TEXI2ROFF=texi2roff
85
8073190b
RP
86# Which roff program to use to generate index for texi2roff'd doc
87ROFF = groff
88
5cdea2ac
SC
89#stuff for self hosting (can be overridden in config file).
90HOSTING_CRT0=/lib/crt0.o
91HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else echo $(libdir)/libgcc.a; fi` -lc
92HOSTING_EMU=LDEMULATION=$(EMUL); export LDEMULATION
93
917bffa7
PB
94C++ = g++ -fgnu-linker
95
7e5c1057 96### Host, target, and site specific Makefile fragments come in here.
2ee11735
RP
97###
98
2ee11735
RP
99LINTFLAGS = $(INCLUDES) $(EXTRA_DEF)
100
917bffa7 101.SUFFIXES: .y .x .xr .xu .xn .xbn .sc .scu .scr .scn $(SUFFIXES) .cc
2ee11735 102
77b19d3d
RP
103.c.o:
104 $(CC) -c $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $<
105
917bffa7
PB
106.cc.o:
107 $(C++) -c $(CFLAGS) -I$(srcdir) $<
108
eb02fd64
RP
109# go directly to ld.new in case this ld isn't capable of
110# linking native object on this host. It can be renamed on
111# install.
e7921bd4 112LD_PROG = ld.new
f78e2569 113
eb02fd64 114# for self hosting
12fa72d4
SC
115BFDLIB=./../bfd/libbfd.a
116LIBIBERTY=./../libiberty/libiberty.a
eb02fd64 117
ab57b174
ILT
118ALL_EMULATIONS=em_lnk960.o em_sun3.o em_i386aout.o em_go32.o \
119 em_m88kbcs.o em_a29k.o em_news.o em_hp300bsd.o \
120 em_h8300hms.o em_ebmon29k.o em_sun4.o em_gld960.o \
121 em_m68kcoff.o em_h8300xray.o em_st2000.o em_sa29200.o \
42b5c739 122 em_vanilla.o em_i386coff.o em_z8ksim.o em_mipslit.o
7e5c1057
PB
123
124EMULATION_OFILES=${ALL_EMULATIONS}
ab57b174 125#EMULATION_OFILES=em_${EMUL}.o ${OTHER_EMULATIONS}
7e5c1057 126
119afd7b 127OFILES= ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldindr.o \
7e5c1057 128 ldwarn.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldsym.o \
fc60e4f7 129 ldfile.o relax.o lderror.o ${EMULATION_OFILES}
eb02fd64 130
ce4d59e2
SC
131HEADERS=config.h ldmain.h ldmain.h ldwarn.h ldmisc.h ldindr.h \
132 ldsym.h ldctor.h ldlang.h ldexp.h \
239d28f3 133 ldlex.h ldwrite.h ldver.h ldemul.h ldfile.h ldgram.h ld.h
eb02fd64
RP
134
135MANSOURCES=ld.tex
136
119afd7b 137LDCSOURCES=ldlang.c lexsup.c ldctor.c mri.c ldindr.c ldmain.c ldwrite.c ldwarn.c ldlnk960.c \
ab57b174 138 em_gld.c em_sun3.c em_go32.c em_m88k.c em_ebmon29k.c \
2e2bf962 139 ldgld960.c ldemul.c ldver.c ldmisc.c ldexp.c ldsym.c ldfile.c \
fc60e4f7 140 relax.c lderror.c
eb02fd64 141
ab57b174 142GENERATED_SOURCES=ldgram.c ldlex.c em_*.c ldemul-list.h
7e5c1057 143GENERATED_HEADERS=ldgram.h ldemul-list.h
eb02fd64 144
cc964c6f 145LDSOURCES=$(LDCSOURCES) ldgram.y ldlex.l ldgram.h
eb02fd64 146
2ee11735 147BFDSOURCES=../../bfd/common/*.c
eb02fd64
RP
148
149SOURCES= $(LDSOURCES) $(BFDSOURCES)
150LINTSOURCES= $(LDCSOURCES) $(BFDSOURCES) $(GENERATED_SOURCES)
151
ab57b174 152STAGESTUFF = *.x *.x[runN] *.sc[runN] $(GENERATED_SOURCES) $(GENERATED_HEADERS) $(OFILES) mkscript
2ee11735 153
42b5c739 154all: $(LD_PROG)
e06ba18d 155
917bffa7 156check: bootstrap check-cdtest
e06ba18d 157info: ld.info
2ee11735 158
4976e6ab 159ldgram.h ldgram.c: ldgram.y
5ff21fa5 160 $(BISON) $(BISONFLAGS) -d $(srcdir)/ldgram.y
31e54f5d
RP
161 mv -f y.tab.c ldgram.c
162 mv -f y.tab.h ldgram.h
cc964c6f 163
42b5c739
ILT
164
165DEF_EMUL = ` if [ -z "$(EMUL)" ] ; then \
166 echo "you must set a default emulation" 1>&2 ; \
167 exit 1 ; \
168 else \
169 echo -DDEFAULT_EMULATION='"$(EMUL)"' ; \
170 fi`
171
172
d20fb445 173ldmain.o: ldmain.c
42b5c739 174 $(CC) $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(DEF_EMUL) -c $<
7e5c1057 175
42b5c739 176ldemul-list.h:
7e5c1057
PB
177 (echo "/* This file is automatically generated. DO NOT EDIT! */";\
178 for f in `echo " " ${EMULATION_OFILES} "" \
ab57b174 179 | sed -e 's/em_/ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
7e5c1057
PB
180 echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
181 done;\
182 echo "";\
183 echo "#define EMULATION_LIST \\";\
184 for f in `echo " " ${EMULATION_OFILES} "" \
ab57b174 185 | sed -e 's/em_/ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
7e5c1057
PB
186 echo " &ld_$${f}_emulation, \\"; \
187 done;\
188 echo " 0") >ldemul-list.h
189
190ldemul.o: ldemul-list.h
d20fb445 191
42b5c739 192ldlex.c: ldlex.l ldgram.h
5ff21fa5
PB
193 $(LEX) -I -Cem $(srcdir)/ldlex.l
194 mv lex.yy.c ldlex.c
19b03b7a 195
ab57b174 196# These all start with em_ so 'make clean' can find them.
c61b4184 197
7e5c1057
PB
198GENSCRIPTS=sh $(srcdir)/genscripts.sh ${srcdir} ${host_alias} ${target_alias}
199GEN_DEPENDS=./mkscript $(srcdir)/genscripts.sh
200
ab57b174 201em_sun4.c: $(srcdir)/sun4.sh \
7e5c1057
PB
202 $(srcdir)/generic.em $(srcdir)/aout.sc-sh ${GEN_DEPENDS}
203 ${GENSCRIPTS} sun4.sh
ab57b174 204em_sun3.c: $(srcdir)/sun3.sh \
7e5c1057
PB
205 $(srcdir)/generic.em $(srcdir)/aout.sc-sh ${GEN_DEPENDS}
206 ${GENSCRIPTS} sun3.sh
ab57b174 207em_go32.c: $(srcdir)/go32.sh \
9d1fe8a4
SC
208 $(srcdir)/generic.em $(srcdir)/aout.sc-sh ${GEN_DEPENDS}
209 ${GENSCRIPTS} go32.sh
ab57b174 210em_news.c: $(srcdir)/news.sh \
7e5c1057
PB
211 $(srcdir)/generic.em $(srcdir)/aout.sc-sh ${GEN_DEPENDS}
212 ${GENSCRIPTS} news.sh
ab57b174 213em_hp300bsd.c: $(srcdir)/hp300bsd.sh \
1584d069
PB
214 $(srcdir)/generic.em $(srcdir)/aout.sc-sh ${GEN_DEPENDS}
215 ${GENSCRIPTS} hp300bsd.sh
ab57b174 216em_i386aout.c: $(srcdir)/i386aout.sh \
7e5c1057
PB
217 $(srcdir)/generic.em $(srcdir)/aout.sc-sh ${GEN_DEPENDS}
218 ${GENSCRIPTS} i386aout.sh
ab57b174 219em_ebmon29k.c: $(srcdir)/ebmon29k.sh \
7e5c1057
PB
220 $(srcdir)/generic.em $(srcdir)/ebmon29k.sc-sh ${GEN_DEPENDS}
221 ${GENSCRIPTS} ebmon29k.sh
ab57b174 222em_sa29200.c: $(srcdir)/sa29200.sh \
fe3e4dfc
SC
223 $(srcdir)/generic.em $(srcdir)/sa29200.sc-sh ${GEN_DEPENDS}
224 ${GENSCRIPTS} sa29200.sh
ab57b174 225em_a29k.c: $(srcdir)/a29k.sh \
7e5c1057
PB
226 $(srcdir)/generic.em $(srcdir)/a29k.sc-sh ${GEN_DEPENDS}
227 ${GENSCRIPTS} a29k.sh
ab57b174 228em_m88kbcs.c: $(srcdir)/m88kbcs.sh \
7e5c1057
PB
229 $(srcdir)/generic.em $(srcdir)/h8300hms.sc-sh ${GEN_DEPENDS}
230 ${GENSCRIPTS} m88kbcs.sh
ab57b174 231em_h8300hms.c: $(srcdir)/h8300hms.sh \
7e5c1057
PB
232 $(srcdir)/h8300hms.em $(srcdir)/h8300hms.sc-sh ${GEN_DEPENDS}
233 ${GENSCRIPTS} h8300hms.sh
ab57b174 234em_h8300xray.c: $(srcdir)/h8300xray.sh \
9d1fe8a4
SC
235 $(srcdir)/h8300xray.em $(srcdir)/h8300xray.sc-sh ${GEN_DEPENDS}
236 ${GENSCRIPTS} h8300xray.sh
ab57b174 237em_st2000.c: $(srcdir)/st2000.sh \
119afd7b
RP
238 $(srcdir)/st2000.em $(srcdir)/st2000.sc-sh ${GEN_DEPENDS}
239 ${GENSCRIPTS} st2000.sh
22a78f0d
SC
240em_z8ksim.c: $(srcdir)/z8ksim.sh \
241 $(srcdir)/z8ksim.em $(srcdir)/z8ksim.sc-sh ${GEN_DEPENDS}
242 ${GENSCRIPTS} z8ksim.sh
ab57b174 243em_vanilla.c: $(srcdir)/vanilla.sh \
7e5c1057
PB
244 $(srcdir)/vanilla.em $(srcdir)/vanilla.sc-sh ${GEN_DEPENDS}
245 ${GENSCRIPTS} vanilla.sh
ab57b174 246em_lnk960.c: $(srcdir)/lnk960.sh \
7e5c1057
PB
247 $(srcdir)/lnk960.em $(srcdir)/i960.sc-sh ${GEN_DEPENDS}
248 ${GENSCRIPTS} lnk960.sh
ab57b174 249em_gld960.c: $(srcdir)/gld960.sh \
7e5c1057
PB
250 $(srcdir)/gld960.em $(srcdir)/i960.sc-sh ${GEN_DEPENDS}
251 ${GENSCRIPTS} gld960.sh
ab57b174
ILT
252em_m68kcoff.c: $(srcdir)/m68kcoff.sh \
253 $(srcdir)/generic.em $(srcdir)/m68kcoff.sc-sh ${GEN_DEPENDS}
254 ${GENSCRIPTS} m68kcoff.sh
99e6298a
SC
255em_i386coff.c: $(srcdir)/i386coff.sh \
256 $(srcdir)/generic.em $(srcdir)/i386coff.sc-sh ${GEN_DEPENDS}
257 ${GENSCRIPTS} i386coff.sh
42b5c739
ILT
258em_mipslit.c: $(srcdir)/mipslit.sh \
259 $(srcdir)/generic.em $(srcdir)/mips.sc-sh ${GEN_DEPENDS}
260 ${GENSCRIPTS} mipslit.sh
eb02fd64 261
e77463a1 262$(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY)
77b19d3d 263 $(CC) $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(LOADLIBES)
e7921bd4 264
7e5c1057 265# Rules for testing by relinking ld itself.
eb02fd64 266
7e5c1057
PB
267ld-partial.o: ld.new
268 $(HOSTING_EMU); ./ld.new -o ld-partial.o -r $(OFILES)
269ld1: ld-partial.o
270 $(HOSTING_EMU); ./ld.new -o ld1 $(HOSTING_CRT0) ld-partial.o $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
eb02fd64 271
7e5c1057
PB
272ld1-full: ld.new
273 $(HOSTING_EMU); ./ld.new -o ld1-full $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
eb02fd64 274
d20fb445
SC
275ld2: ld1
276 $(HOSTING_EMU); ./ld1 -o ld2 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
60048a2c 277
eb02fd64 278ld3: ld2
e77463a1 279 $(HOSTING_EMU); ./ld2 -o ld3 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
eb02fd64 280
d20fb445
SC
281bootstrap: ld3
282 cmp ld2 ld3
283
917bffa7
PB
284cdtest: cdtest-main.o cdtest-func.o cdtest-foo.o
285 $(HOSTING_EMU); ./ld.new -o cdtest $(HOSTING_CRT0) \
286 cdtest-main.o cdtest-func.o cdtest-foo.o $(HOSTING_LIBS)
287
288check-cdtest: cdtest $(srcdir)/cdtest.exp
289 ./cdtest >cdtest.out
290 diff $(srcdir)/cdtest.exp cdtest.out
291
8073190b
RP
292######################################################################
293# DOCUMENTATION TARGETS
294# TeX output
9c7810d6
RP
295ld.dvi: $(srcdir)/ld.texinfo
296 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/ld.texinfo
8d317d2a 297 texindex ld.??
9c7810d6 298 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/ld.texinfo
4b91c519
PB
299ldint.dvi: $(srcdir)/ldint.texinfo
300 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/ldint.texinfo
301 texindex ldint.??
302 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/ldint.texinfo
8d317d2a 303
8073190b 304# info file for online browsing
9c7810d6 305ld.info: $(srcdir)/ld.texinfo
e06ba18d 306 $(MAKEINFO) -o ld.info $(srcdir)/ld.texinfo
eb02fd64 307
4b91c519
PB
308ldint.info: $(srcdir)/ldint.texinfo
309 $(MAKEINFO) -o ldint.info $(srcdir)/ldint.texinfo
310
954ac2ea 311#separate targets for "ms", "me", and "mm" forms of roff doc
e06ba18d
PB
312# Try to use a recent texi2roff. v2 was put on prep in jan91.
313# If you want an index, see texi2roff doc for postprocessing
314# and add -i to texi2roff invocations below.
315# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
316# correspondint -e lines when later texi2roff's are current)
317# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
318# + @c's deleted explicitly because texi2roff sees texinfo commands in them
319# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
320# + @alphaenumerate is ridiculously new, turned into @enumerate
321
9c7810d6 322ld.ms: $(srcdir)/ld.texinfo
8073190b
RP
323 sed -e '/\\input texinfo/d' \
324 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
e06ba18d
PB
325 -e '/^@ifinfo/,/^@end ifinfo/d' \
326 -e '/^@c/d' \
327 -e 's/{.*,,/{/' \
328 -e 's/@ / /g' \
329 -e 's/^@alphaenumerate/@enumerate/g' \
330 -e 's/^@end alphaenumerate/@end enumerate/g' \
9c7810d6 331 $(srcdir)/ld.texinfo | \
e06ba18d
PB
332 $(TEXI2ROFF) $(TEXI2OPT) -ms | \
333 sed -e 's/---/\\(em/g' \
334 >>ld.ms
8073190b
RP
335
336# index for roff output
337ld-index.ms: ld.ms
338 $(ROFF) -ms ld.ms 2>&1 1>/dev/null | \
339 sed -e '/: warning:/d' | \
340 texi2index >ld-index.ms
341
954ac2ea 342# roff output (-mm)
9c7810d6 343ld.mm: $(srcdir)/ld.texinfo
954ac2ea
RP
344 sed -e '/\\input texinfo/d' \
345 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
e06ba18d
PB
346 -e '/^@ifinfo/,/^@end ifinfo/d' \
347 -e '/^@c/d' \
9c7810d6
RP
348 -e 's/{.*,,/{/' \
349 -e '/@noindent/d' \
e06ba18d
PB
350 -e 's/@ / /g' \
351 -e 's/^@alphaenumerate/@enumerate/g' \
352 -e 's/^@end alphaenumerate/@end enumerate/g' \
9c7810d6 353 $(srcdir)/ld.texinfo | \
e06ba18d 354 $(TEXI2ROFF) $(TEXI2OPT) -mm | \
9c7810d6
RP
355 sed -e 's/---/\\(em/g' \
356 >ld.mm
954ac2ea
RP
357
358# index for roff output
359ld-index.mm: ld.mm
360 $(ROFF) -mm ld.mm 2>&1 1>/dev/null | \
361 sed -e '/: warning:/d' | \
362 texi2index >ld-index.mm
363
364# roff output (-me)
9c7810d6 365ld.me: $(srcdir)/ld.texinfo
954ac2ea
RP
366 sed -e '/\\input texinfo/d' \
367 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
e06ba18d
PB
368 -e '/^@ifinfo/,/^@end ifinfo/d' \
369 -e '/^@c/d' \
370 -e 's/{.*,,/{/' \
371 -e 's/@ / /g' \
372 -e 's/^@alphaenumerate/@enumerate/g' \
373 -e 's/^@end alphaenumerate/@end enumerate/g' \
9c7810d6 374 $(srcdir)/ld.texinfo | \
e06ba18d
PB
375 $(TEXI2ROFF) $(TEXI2OPT) -me | \
376 sed -e 's/---/\\(em/g' \
377 >>ld.me
954ac2ea
RP
378
379# index for roff output
380ld-index.me: ld.me
381 $(ROFF) -me ld.me 2>&1 1>/dev/null | \
382 sed -e '/: warning:/d' | \
383 texi2index >ld-index.me
384
385
8073190b
RP
386######################################################################
387
12fa72d4 388./mkscript: $(srcdir)/mkscript.c
ab57b174 389 $(HOST_CC) -o mkscript $(srcdir)/mkscript.c
f78e2569 390
cc964c6f
SC
391ldlex.o: ldlex.c ldgram.h
392ldgram.o: ldgram.c
393ldgram.c:ldgram.y
42b5c739
ILT
394ldexp.o: ldexp.c ldgram.h
395ldctor.o: ldctor.c ldgram.h
396ldlang.o: ldlang.c ldgram.h
397ldmain.o: ldmain.c ldgram.h
398ldwrite.o: ldwrite.c ldgram.h
399lexsup.o: lexsup.c ldgram.h
400mri.o: mri.c ldgram.h
401relax.o: relax.c ldgram.h
eb02fd64 402
7e5c1057 403h8300hms.o:h8300hms.c
9d1fe8a4 404h8300xray.o:h8300xray.c
119afd7b 405st2000.o:st2000.c
22a78f0d 406z8ksim.o:z8ksim.c
565a4c76 407
e7921bd4 408stage1: force
e06ba18d 409 -mkdir stage1
ab57b174 410 -mv -f $(STAGESTUFF) $(LD_PROG) stage1
e06ba18d 411 -(cd stage1 ; ln -s $(LD_PROG) ld)
f78e2569 412
e7921bd4 413stage2: force
e06ba18d 414 -mkdir stage2
ab57b174 415 -mv -f $(STAGESTUFF) $(LD_PROG) stage2
e06ba18d 416 -(cd stage2 ; ln -s $(LD_PROG) ld)
f78e2569 417
e7921bd4 418stage3: force
e06ba18d 419 -mkdir stage3
ab57b174 420 -mv -f $(STAGESTUFF) $(LD_PROG) stage3
e06ba18d 421 -(cd stage3 ; ln -s $(LD_PROG) ld)
eb02fd64 422
e46cdcdd
RP
423against=stage2
424
425comparison: force
ab57b174 426 for i in $(STAGESTUFF) $(LD_PROG) ; do cmp $$i $(against)/$$i ; done
e46cdcdd 427
e7921bd4 428de-stage1: force
e06ba18d
PB
429 -(cd stage1 ; mv -f * ..)
430 -rm ld
431 -rmdir stage1
e7921bd4
RP
432
433de-stage2: force
e06ba18d
PB
434 -(cd stage2 ; mv -f * ..)
435 -rm ld
436 -rmdir stage2
e7921bd4
RP
437
438de-stage3: force
e06ba18d
PB
439 -(cd stage3 ; mv -f * ..)
440 -rm ld
441 -rmdir stage3
e7921bd4 442
ab57b174
ILT
443# Stuff that should be included in a distribution:
444LDDISTSTUFF=ldgram.c ldgram.h ldlex.c ld.mm
445diststuff: $(LDDISTSTUFF)
446
447mostlyclean:
448 -rm -f $(STAGESTUFF) ld.?? ld.??? ldlex.[qp]
917bffa7 449 -rm -f ld ld1 ld2 ld3 *.o y.output cdtest cdtest.out
ab57b174
ILT
450clean: mostlyclean
451 -rm -f $(LD_PROG)
452distclean: clean
42b5c739 453 -rm -f Makefile config.status TAGS sysdep.h
ab57b174
ILT
454realclean: distclean
455 -rm -f $(LDDISTSTUFF)
eb02fd64
RP
456
457lintlog:$(SOURCES) Makefile
2ee11735 458 $(LINT) -abhxzn $(LINTFLAGS) $(LINTSOURCES) \
eb02fd64
RP
459| grep -v "pointer casts may be troublesome" \
460| grep -v "possible pointer alignment problem" \
461| grep -v "ignore" \
462| grep -v "conversion from long may lose accuracy" \
463| grep -v "warning: constant argument to NOT" \
464| grep -v "enumeration type clash, operator CAST" \
465| grep -v "warning: constant in conditional context"\
466| grep -v "archive\.c"
467
468
469tags TAGS:$(SOURCES) $(HEADERS)
19b03b7a 470 etags -t $?
eb02fd64 471
eb02fd64
RP
472
473objdump:objdump.c
474
12fa72d4 475.PHONY: install
e7921bd4 476install: $(LD_PROG)
b189e892
ILT
477 -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \
478 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
479 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
480 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
481 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
482 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
0bb95ac8
ILT
483 -n=`t='$(program_transform_name)'; echo ld | sed -e "" $$t`; \
484 rm -f $(bindir)/$$n; \
485 $(INSTALL_PROGRAM) ld.new $(bindir)/$$n; \
56409445
ILT
486 $(INSTALL_DATA) $(srcdir)/ld.1 $(man1dir)/$$n.1; \
487 if [ -d $(tooldir) ]; then \
488 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
489 rm -f $(tooldir)/bin/ld; \
490 ln $(bindir)/$$n $(tooldir)/bin/ld \
491 || $(INSTALL_PROGRAM) ld.new $(tooldir)/bin/ld; \
42b5c739 492 ln $(tooldir)/bin/ld $(tooldir)/bin/gld; \
56409445 493 else true; fi
e06ba18d
PB
494
495install-info: info
b189e892
ILT
496 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
497 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
498 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
afe3aa73 499 for i in ld.info* ; do \
e06ba18d 500 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
afe3aa73
RP
501 done
502
12fa72d4
SC
503clean-info:
504 -rm -rf *.info*
505
eb02fd64
RP
506#-----------------------------------------------------------------------------
507# 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
508#
509# 'VERSION' file must be present and contain a string of the form "x.y"
510#-----------------------------------------------------------------------------
511
512ver960.c: FORCE
513 rm -f ver960.c
514 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
515
516
517# This target should be invoked before building a new release.
518# 'VERSION' file must be present and contain a string of the form "x.y"
519#
520roll:
521 @V=`cat VERSION` ; \
522 MAJ=`sed 's/\..*//' VERSION` ; \
523 MIN=`sed 's/.*\.//' VERSION` ; \
524 V=$$MAJ.`expr $$MIN + 1` ; \
525 rm -f VERSION ; \
526 echo $$V >VERSION ; \
527 echo Version $$V
528
239d28f3 529
e1e5fbfc 530dep: $(LDSOURCES)
239d28f3
SC
531 mkdep $(CFLAGS) $?
532
eb02fd64
RP
533# Dummy target to force execution of dependent targets.
534#
e7921bd4 535force:
eb02fd64
RP
536
537# Target to uncomment host-specific lines in this makefile. Such lines must
538# have the following string beginning in column 1: #__<hostname>__#
539# Original Makefile is backed up as 'Makefile.old'.
540#
541# Invoke with: make make HOST=xxx
542#
543make:
544 -@if test $(HOST)x = x ; then \
545 echo '\aSpecify "make make HOST=???"'; \
546 exit 1; \
547 fi ; \
548 grep -s "^#The next line was generated by 'make make'" Makefile; \
549 if test $$? = 0 ; then \
550 echo "\aMakefile has already been processed with 'make make'";\
551 exit 1; \
552 fi ; \
553 mv -f Makefile Makefile.old; \
554 echo "#The next line was generated by 'make make'" >Makefile ; \
555 echo "HOST=$(HOST)" >>Makefile ; \
556 echo >>Makefile ; \
557 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
558
559#\f
560
f1eb48b6 561Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 562 $(SHELL) ./config.status
eb02fd64 563
eb02fd64 564### mode:fundamental ***
e06ba18d 565### Local Variables: ***
eb02fd64
RP
566### page-delimiter: "^#\f" ***
567### End: ***
568### end of file
239d28f3
SC
569
570
571# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.091858 seconds and 4 git commands to generate.