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