Commit | Line | Data |
---|---|---|
ce4d59e2 | 1 | # Makefile for the GNU linker ld (version 2) |
3a9149a7 | 2 | # Copyright (C) 1989-1993 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 | |
21 | srcdir = . | |
3a9149a7 | 22 | objdir = . |
eb02fd64 | 23 | |
e06ba18d PB |
24 | prefix = /usr/local |
25 | ||
0bb95ac8 | 26 | program_transform_name = |
12fa72d4 SC |
27 | exec_prefix = $(prefix) |
28 | bindir = $(exec_prefix)/bin | |
29 | libdir = $(exec_prefix)/lib | |
034351e3 | 30 | tooldir = $(exec_prefix)/$(target_alias) |
e06ba18d | 31 | datadir = $(prefix)/lib |
12fa72d4 | 32 | mandir = $(prefix)/man |
e06ba18d PB |
33 | man1dir = $(mandir)/man1 |
34 | man2dir = $(mandir)/man2 | |
35 | man3dir = $(mandir)/man3 | |
36 | man4dir = $(mandir)/man4 | |
37 | man5dir = $(mandir)/man5 | |
38 | man6dir = $(mandir)/man6 | |
39 | man7dir = $(mandir)/man7 | |
40 | man8dir = $(mandir)/man8 | |
41 | man9dir = $(mandir)/man9 | |
12fa72d4 | 42 | infodir = $(prefix)/info |
e06ba18d PB |
43 | includedir = $(prefix)/include |
44 | docdir = $(datadir)/doc | |
173a0c3d | 45 | # We put the scripts in the directory $(scriptdir)/ldscripts. |
559d7baf RP |
46 | # We can't put the scripts in $(datadir) because the SEARCH_DIR |
47 | # directives need to be different for native and cross linkers. | |
173a0c3d | 48 | scriptdir = $(tooldir)/lib |
e06ba18d | 49 | |
2cbe4c5f HS |
50 | gcclibdir = $(libdir)/gcc/$(target_alias) |
51 | ||
e06ba18d PB |
52 | SHELL = /bin/sh |
53 | ||
e0d005f2 | 54 | INSTALL = `cd $(srcdir); pwd`/../install.sh -c |
e06ba18d PB |
55 | INSTALL_PROGRAM = $(INSTALL) |
56 | INSTALL_DATA = $(INSTALL) | |
5ebaf24b | 57 | INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)' |
c97b9003 DZ |
58 | INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1 |
59 | ||
e06ba18d PB |
60 | AR = ar |
61 | AR_FLAGS = qv | |
77b19d3d | 62 | CFLAGS = -g |
e06ba18d | 63 | MAKEINFO = makeinfo |
2412a768 | 64 | TEXI2DVI = texi2dvi |
e06ba18d | 65 | RANLIB = ranlib |
2412a768 | 66 | CC_FOR_BUILD=$(CC) |
bf3acf44 | 67 | BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi` |
2df68136 | 68 | LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi` |
8c32cf6e | 69 | |
12fa72d4 | 70 | #version=/`./../gcc/gcc -dumpversion` |
092df318 | 71 | version= |
8c32cf6e | 72 | |
ee17cac9 PB |
73 | # Seach path to override the default search path for -lfoo libraries. |
74 | # If LIB_PATH is empty, the ones in the script (if any) are left alone. | |
917bffa7 PB |
75 | # (The default is usually /lib:usr/lib:/usr/local/lib, unless building |
76 | # a cross-linker, in which case the default is empty. See genscripts.sh.) | |
ee17cac9 PB |
77 | # Otherwise, they are replaced with the ones given in LIB_PATH, |
78 | # which may have the form: LIB_PATH=/lib:/usr/local/lib | |
79 | LIB_PATH = | |
80 | ||
959eba20 JO |
81 | BASEDIR = $(srcdir)/.. |
82 | BFDDIR = $(BASEDIR)/bfd | |
83 | INCDIR = $(BASEDIR)/include | |
84 | INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) | |
2ee11735 | 85 | |
2412a768 RP |
86 | # What version of the manual to build |
87 | DOCVER = gen | |
88 | ||
8073190b | 89 | # Where to find texinfo.tex to format docn with TeX |
8d317d2a RP |
90 | TEXIDIR = $(srcdir)/../texinfo/fsf |
91 | ||
959eba20 JO |
92 | # Where to find other docs needed to format with TeX |
93 | TEXINPUTS = $(TEXIDIR):$(BFDDIR)/doc:$(srcdir) | |
94 | ||
10a69a37 | 95 | # Whether to get roff to put indexing entries on stderr |
954ac2ea RP |
96 | TEXI2OPT = |
97 | # You neeed this to generate ld-index.ms (or .mm or .me) | |
98 | # TEXI2OPT = -i | |
8073190b | 99 | |
e06ba18d PB |
100 | TEXI2ROFF=texi2roff |
101 | ||
8073190b RP |
102 | # Which roff program to use to generate index for texi2roff'd doc |
103 | ROFF = groff | |
104 | ||
5cdea2ac SC |
105 | #stuff for self hosting (can be overridden in config file). |
106 | HOSTING_CRT0=/lib/crt0.o | |
8ddef552 DM |
107 | HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc |
108 | HOSTING_EMU=-m $(EMUL) | |
5cdea2ac | 109 | |
3a9149a7 JW |
110 | CXX = `if [ -f ../gcc/xgcc ] ; then \ |
111 | echo ../gcc/xgcc -B../gcc/; \ | |
112 | else echo gcc; \ | |
113 | fi` | |
114 | CXXFLAGS = -fgnu-linker | |
115 | ||
8a6665ae JW |
116 | # FIX_ME: using ../gcc/xgcc breaks the cdtest. |
117 | CXX= g++ | |
118 | ||
3a9149a7 JW |
119 | # Setup the testing framework, if you have one |
120 | RUNTEST = runtest | |
121 | RUNTEST_FLAGS = | |
122 | RUNTEST_CC = `if [ -f ../gcc/xgcc ] ; then \ | |
123 | echo ../gcc/xgcc -B../gcc/; \ | |
124 | else echo gcc; \ | |
125 | fi` | |
126 | RUNTEST_CFLAGS = $(CFLAGS) | |
127 | RUNTEST_CXX = `if [ -f ../gcc/xgcc ] ; then \ | |
128 | echo ../gcc/xgcc -B../gcc/; \ | |
129 | else echo gcc; \ | |
130 | fi` | |
108f145b JW |
131 | # FIX_ME: using ../gcc/xgcc breaks the cdtest. |
132 | RUNTEST_CXX = CXX | |
3a9149a7 | 133 | RUNTEST_CXXFLAGS = $(CXXFLAGS) |
c97b9003 | 134 | |
58bf66f9 KR |
135 | all: |
136 | ||
7e5c1057 | 137 | ### Host, target, and site specific Makefile fragments come in here. |
63545898 | 138 | #### |
2ee11735 | 139 | |
2ee11735 RP |
140 | LINTFLAGS = $(INCLUDES) $(EXTRA_DEF) |
141 | ||
565c93e9 DM |
142 | # The .cc suffix is used by `make check'. |
143 | ||
144 | .SUFFIXES: .y $(SUFFIXES) .cc | |
145 | ||
173a0c3d DM |
146 | # Suppress smart makes who think they know how to automake Yacc files |
147 | .y.c: | |
148 | ||
565c93e9 | 149 | .cc.o: |
3a9149a7 | 150 | $(CXX) -c -I$(srcdir) $(CXXFLAGS) $(CFLAGS) $< |
565c93e9 | 151 | |
77b19d3d | 152 | .c.o: |
8ddef552 | 153 | $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(CFLAGS) $< |
c97b9003 | 154 | |
eb02fd64 RP |
155 | # go directly to ld.new in case this ld isn't capable of |
156 | # linking native object on this host. It can be renamed on | |
157 | # install. | |
e7921bd4 | 158 | LD_PROG = ld.new |
f78e2569 | 159 | |
eb02fd64 | 160 | # for self hosting |
959eba20 JO |
161 | BFDLIB = ../bfd/libbfd.a |
162 | LIBIBERTY = ../libiberty/libiberty.a | |
eb02fd64 | 163 | |
0750b974 | 164 | ALL_EMULATIONS=em_lnk960.o em_sun3.o em_i386aout.o em_go32.o \ |
63545898 | 165 | em_m88kbcs.o em_a29k.o em_news.o em_hp300bsd.o em_hp3hpux.o \ |
4ab3a31f | 166 | em_h8300.o em_h8300h.o em_ebmon29k.o em_sun4.o em_gld960.o \ |
034351e3 | 167 | em_m68kcoff.o em_st2000.o em_sa29200.o \ |
e637dcf0 | 168 | em_vanilla.o em_i386coff.o em_z8ksim.o em_mipslit.o em_i386bsd.o \ |
8ddef552 | 169 | em_mipsbig.o em_mipsbsd.o em_mipsidt.o em_vax.o em_h8500.o \ |
58bf66f9 KR |
170 | em_hppaosf.o em_mipsidtl.o em_sh.o \ |
171 | $(OTHER_EMULATIONS) | |
7e5c1057 | 172 | |
959eba20 JO |
173 | # This is now set by configure.in. |
174 | #EMULATION_OFILES=${ALL_EMULATIONS} | |
7e5c1057 | 175 | |
119afd7b | 176 | OFILES= ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldindr.o \ |
7e5c1057 | 177 | ldwarn.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldsym.o \ |
fc60e4f7 | 178 | ldfile.o relax.o lderror.o ${EMULATION_OFILES} |
eb02fd64 | 179 | |
ce4d59e2 SC |
180 | HEADERS=config.h ldmain.h ldmain.h ldwarn.h ldmisc.h ldindr.h \ |
181 | ldsym.h ldctor.h ldlang.h ldexp.h \ | |
239d28f3 | 182 | ldlex.h ldwrite.h ldver.h ldemul.h ldfile.h ldgram.h ld.h |
eb02fd64 RP |
183 | |
184 | MANSOURCES=ld.tex | |
185 | ||
119afd7b | 186 | LDCSOURCES=ldlang.c lexsup.c ldctor.c mri.c ldindr.c ldmain.c ldwrite.c ldwarn.c ldlnk960.c \ |
63545898 | 187 | em_gld.c em_sun3.c em_go32.c em_m88k.c em_ebmon29k.c em_hppaosf.c \ |
2e2bf962 | 188 | ldgld960.c ldemul.c ldver.c ldmisc.c ldexp.c ldsym.c ldfile.c \ |
fc60e4f7 | 189 | relax.c lderror.c |
eb02fd64 | 190 | |
ab57b174 | 191 | GENERATED_SOURCES=ldgram.c ldlex.c em_*.c ldemul-list.h |
7e5c1057 | 192 | GENERATED_HEADERS=ldgram.h ldemul-list.h |
eb02fd64 | 193 | |
cc964c6f | 194 | LDSOURCES=$(LDCSOURCES) ldgram.y ldlex.l ldgram.h |
eb02fd64 | 195 | |
2ee11735 | 196 | BFDSOURCES=../../bfd/common/*.c |
eb02fd64 RP |
197 | |
198 | SOURCES= $(LDSOURCES) $(BFDSOURCES) | |
199 | LINTSOURCES= $(LDCSOURCES) $(BFDSOURCES) $(GENERATED_SOURCES) | |
200 | ||
959eba20 | 201 | STAGESTUFF = *.o ldscripts/* $(GENERATED_SOURCES) $(GENERATED_HEADERS) |
2ee11735 | 202 | |
42b5c739 | 203 | all: $(LD_PROG) |
e06ba18d PB |
204 | |
205 | info: ld.info | |
2ee11735 | 206 | |
173a0c3d | 207 | ldgram.h ldgram.c: ldgram.y |
5ff21fa5 | 208 | $(BISON) $(BISONFLAGS) -d $(srcdir)/ldgram.y |
31e54f5d RP |
209 | mv -f y.tab.c ldgram.c |
210 | mv -f y.tab.h ldgram.h | |
cc964c6f | 211 | |
a6152e39 | 212 | # EMUL is the name of a file in the emulparams subdir, without the .sh. |
42b5c739 ILT |
213 | DEF_EMUL = ` if [ -z "$(EMUL)" ] ; then \ |
214 | echo "you must set a default emulation" 1>&2 ; \ | |
215 | exit 1 ; \ | |
216 | else \ | |
217 | echo -DDEFAULT_EMULATION='"$(EMUL)"' ; \ | |
218 | fi` | |
42b5c739 | 219 | |
959eba20 JO |
220 | ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ |
221 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
222 | $(INCDIR)/fopen-same.h config.h ld.h \ | |
223 | ldmain.h ldmisc.h ldwrite.h ./ldgram.h \ | |
224 | ldsym.h ldlang.h ldemul.h ldlex.h \ | |
225 | ldfile.h ldindr.h ldwarn.h ldctor.h \ | |
226 | lderror.h | |
ff76a7db | 227 | $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(DEF_EMUL) -DSCRIPTDIR='"$(scriptdir)"' $(CFLAGS) $< |
7e5c1057 | 228 | |
820c446c | 229 | ldemul-list.h: Makefile |
7e5c1057 PB |
230 | (echo "/* This file is automatically generated. DO NOT EDIT! */";\ |
231 | for f in `echo " " ${EMULATION_OFILES} "" \ | |
ab57b174 | 232 | | sed -e 's/em_/ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \ |
7e5c1057 PB |
233 | echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \ |
234 | done;\ | |
235 | echo "";\ | |
236 | echo "#define EMULATION_LIST \\";\ | |
237 | for f in `echo " " ${EMULATION_OFILES} "" \ | |
ab57b174 | 238 | | sed -e 's/em_/ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \ |
7e5c1057 PB |
239 | echo " &ld_$${f}_emulation, \\"; \ |
240 | done;\ | |
241 | echo " 0") >ldemul-list.h | |
242 | ||
42b5c739 | 243 | ldlex.c: ldlex.l ldgram.h |
5ff21fa5 PB |
244 | $(LEX) -I -Cem $(srcdir)/ldlex.l |
245 | mv lex.yy.c ldlex.c | |
19b03b7a | 246 | |
ab57b174 | 247 | # These all start with em_ so 'make clean' can find them. |
c61b4184 | 248 | |
a6152e39 | 249 | GENSCRIPTS=sh $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${host_alias} ${target_alias} ${EMUL} |
8ddef552 | 250 | GEN_DEPENDS=$(srcdir)/genscripts.sh |
7e5c1057 | 251 | |
8ddef552 DM |
252 | em_sun4.c: $(srcdir)/emulparams/sun4.sh \ |
253 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 254 | ${GENSCRIPTS} sun4 |
8ddef552 DM |
255 | em_sun3.c: $(srcdir)/emulparams/sun3.sh \ |
256 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 257 | ${GENSCRIPTS} sun3 |
8ddef552 DM |
258 | em_go32.c: $(srcdir)/emulparams/go32.sh \ |
259 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 260 | ${GENSCRIPTS} go32 |
8ddef552 DM |
261 | em_news.c: $(srcdir)/emulparams/news.sh \ |
262 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 263 | ${GENSCRIPTS} news |
8ddef552 DM |
264 | em_vax.c: $(srcdir)/emulparams/vax.sh \ |
265 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 266 | ${GENSCRIPTS} vax |
8ddef552 DM |
267 | em_hp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \ |
268 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 269 | ${GENSCRIPTS} hp300bsd |
8ddef552 DM |
270 | em_hp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \ |
271 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 272 | ${GENSCRIPTS} hp3hpux |
8ddef552 DM |
273 | em_hppaosf.c: $(srcdir)/emulparams/hppaosf.sh \ |
274 | $(srcdir)/emultempl/hppaosf.em $(srcdir)/scripttempl/hppaosf.sc ${GEN_DEPENDS} | |
a6152e39 | 275 | ${GENSCRIPTS} hppaosf |
8ddef552 DM |
276 | em_i386aout.c: $(srcdir)/emulparams/i386aout.sh \ |
277 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 278 | ${GENSCRIPTS} i386aout |
8ddef552 DM |
279 | em_ebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \ |
280 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS} | |
a6152e39 | 281 | ${GENSCRIPTS} ebmon29k |
8ddef552 DM |
282 | em_sa29200.c: $(srcdir)/emulparams/sa29200.sh \ |
283 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS} | |
a6152e39 | 284 | ${GENSCRIPTS} sa29200 |
8ddef552 DM |
285 | em_a29k.c: $(srcdir)/emulparams/a29k.sh \ |
286 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS} | |
a6152e39 | 287 | ${GENSCRIPTS} a29k |
8ddef552 | 288 | em_m88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \ |
d301e438 | 289 | $(srcdir)/emultempl/m88kbcs.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS} |
a6152e39 | 290 | ${GENSCRIPTS} m88kbcs |
8ddef552 DM |
291 | em_h8300.c: $(srcdir)/emulparams/h8300.sh \ |
292 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS} | |
a6152e39 | 293 | ${GENSCRIPTS} h8300 |
4ab3a31f DE |
294 | em_h8300h.c: $(srcdir)/emulparams/h8300h.sh \ |
295 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS} | |
a6152e39 | 296 | ${GENSCRIPTS} h8300h |
8ddef552 DM |
297 | em_h8500.c: $(srcdir)/emulparams/h8500.sh \ |
298 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS} | |
a6152e39 | 299 | ${GENSCRIPTS} h8500 |
8ddef552 DM |
300 | em_sh.c: $(srcdir)/emulparams/sh.sh \ |
301 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} | |
a6152e39 | 302 | ${GENSCRIPTS} sh |
8ddef552 DM |
303 | em_st2000.c: $(srcdir)/emulparams/st2000.sh \ |
304 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS} | |
a6152e39 | 305 | ${GENSCRIPTS} st2000 |
8ddef552 DM |
306 | em_z8ksim.c: $(srcdir)/emulparams/z8ksim.sh \ |
307 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8ksim.sc ${GEN_DEPENDS} | |
a6152e39 | 308 | ${GENSCRIPTS} z8ksim |
8ddef552 DM |
309 | em_vanilla.c: $(srcdir)/emulparams/vanilla.sh \ |
310 | $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS} | |
a6152e39 | 311 | ${GENSCRIPTS} vanilla |
8ddef552 DM |
312 | em_lnk960.c: $(srcdir)/emulparams/lnk960.sh \ |
313 | $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS} | |
a6152e39 | 314 | ${GENSCRIPTS} lnk960 |
8ddef552 DM |
315 | em_gld960.c: $(srcdir)/emulparams/gld960.sh \ |
316 | $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS} | |
a6152e39 | 317 | ${GENSCRIPTS} gld960 |
8ddef552 DM |
318 | em_m68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \ |
319 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS} | |
a6152e39 | 320 | ${GENSCRIPTS} m68kcoff |
8ddef552 DM |
321 | em_i386coff.c: $(srcdir)/emulparams/i386coff.sh \ |
322 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS} | |
a6152e39 | 323 | ${GENSCRIPTS} i386coff |
8ddef552 DM |
324 | em_mipslit.c: $(srcdir)/emulparams/mipslit.sh \ |
325 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS} | |
a6152e39 | 326 | ${GENSCRIPTS} mipslit |
8ddef552 DM |
327 | em_i386bsd.c: $(srcdir)/emulparams/i386bsd.sh \ |
328 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 329 | ${GENSCRIPTS} i386bsd |
8ddef552 DM |
330 | em_mipsbig.c: $(srcdir)/emulparams/mipsbig.sh \ |
331 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS} | |
a6152e39 | 332 | ${GENSCRIPTS} mipsbig |
8ddef552 DM |
333 | em_mipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \ |
334 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} | |
a6152e39 | 335 | ${GENSCRIPTS} mipsbsd |
8ddef552 DM |
336 | em_mipsidt.c: $(srcdir)/emulparams/mipsidt.sh \ |
337 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS} | |
a6152e39 | 338 | ${GENSCRIPTS} mipsidt |
8ddef552 DM |
339 | em_mipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \ |
340 | $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS} | |
a6152e39 | 341 | ${GENSCRIPTS} mipsidtl |
eb02fd64 | 342 | |
e77463a1 | 343 | $(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY) |
959eba20 JO |
344 | $(CC) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(LOADLIBES) |
345 | ||
346 | # This list of dependencies was generated by doing a make with gcc -MM | |
347 | # saving the output in a file and removing the gcc commands | |
348 | # changing "../../devo/ld/../bfd" to "$(BFDDIR)" | |
349 | # removing "../../devo/ld/" | |
350 | # changing "../include" to "$(INCDIR)" | |
351 | ||
352 | ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h \ | |
353 | ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h $(INCDIR)/fopen-same.h \ | |
354 | ld.h ldexp.h ldver.h ldlang.h \ | |
355 | ldemul.h ldfile.h ldmisc.h mri.h | |
356 | ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/obstack.h ./ldgram.h | |
357 | lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
358 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
359 | $(INCDIR)/fopen-same.h ldlex.h ld.h \ | |
360 | ldexp.h ./ldgram.h ldmisc.h | |
361 | ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
362 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
363 | $(INCDIR)/fopen-same.h ld.h ldmain.h \ | |
364 | ldsym.h ./ldgram.h ldwarn.h ldlang.h \ | |
365 | ldexp.h ldemul.h ldlex.h ldmisc.h \ | |
366 | ldindr.h ldctor.h | |
367 | mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
368 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
369 | $(INCDIR)/fopen-same.h ld.h ldlang.h \ | |
370 | mri.h ./ldgram.h ldexp.h | |
371 | ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
372 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
373 | $(INCDIR)/fopen-same.h ld.h ldlang.h \ | |
374 | ldsym.h ldmisc.h ldexp.h ./ldgram.h | |
375 | ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
376 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
377 | $(INCDIR)/fopen-same.h config.h ld.h \ | |
378 | ldmain.h ldmisc.h ldwrite.h ./ldgram.h \ | |
379 | ldsym.h ldlang.h ldemul.h ldlex.h \ | |
380 | ldfile.h ldindr.h ldwarn.h ldctor.h \ | |
381 | lderror.h | |
382 | ldindr.o: ldindr.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
383 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
384 | $(INCDIR)/fopen-same.h ld.h ldsym.h \ | |
385 | ldmisc.h | |
386 | ldwarn.o: ldwarn.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
387 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
388 | $(INCDIR)/fopen-same.h ldsym.h ldwarn.h \ | |
389 | ldmisc.h | |
390 | ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
391 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
392 | $(INCDIR)/fopen-same.h ldlang.h ld.h \ | |
393 | ldwrite.h ldmisc.h ldsym.h ./ldgram.h \ | |
394 | relax.h | |
395 | ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
396 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
397 | $(INCDIR)/fopen-same.h ld.h ldmain.h \ | |
398 | ldmisc.h ldexp.h ./ldgram.h ldsym.h \ | |
399 | ldlang.h | |
400 | ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
401 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
402 | $(INCDIR)/fopen-same.h config.h ld.h \ | |
403 | ldemul.h ldmisc.h ./ldemul-list.h | |
404 | ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
405 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
406 | $(INCDIR)/fopen-same.h ldver.h ldemul.h | |
407 | ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
408 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
409 | $(INCDIR)/fopen-same.h ld.h ldmisc.h \ | |
410 | ldlang.h ldlex.h | |
411 | ldsym.o: ldsym.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
412 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
413 | $(INCDIR)/fopen-same.h ld.h ldsym.h \ | |
414 | ldmisc.h ldlang.h | |
415 | ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
416 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
417 | $(INCDIR)/fopen-same.h ldmisc.h ldlang.h \ | |
418 | ldfile.h | |
419 | relax.o: relax.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
420 | $(INCDIR)/obstack.h $(BFDDIR)/seclet.h $(INCDIR)/coff/internal.h \ | |
421 | ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h $(INCDIR)/fopen-same.h \ | |
422 | ldlang.h ld.h ldwrite.h ldmisc.h \ | |
423 | ldsym.h ./ldgram.h relax.h | |
424 | lderror.o: lderror.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ | |
425 | $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \ | |
426 | $(INCDIR)/fopen-same.h $(BFDDIR)/seclet.h ld.h \ | |
427 | ldmisc.h | |
8ddef552 | 428 | |
3a9149a7 JW |
429 | # CYGNUS LOCAL targets. |
430 | # These targets are for the dejagnu testsuites. The file site.exp | |
431 | # contains global variables that all the testsuites will use. | |
432 | # There is a current debate as to how and where to generate test | |
433 | # outputs. Rob feels each test should be built in $(objdir) with | |
434 | # a unique name. Cassidy feels that we should create a directory | |
435 | # called $(objdir)/tmpdir and do the work there. This way, there | |
436 | # is no potential conflict with existing objects, ie: as there | |
437 | # was in the past with loop.o and flow.o, and, there is no chance | |
438 | # of filling /tmp, which would cause other problems. Lastly, this | |
439 | # allow retention of the testcase name making debugging easier. | |
440 | # | |
441 | testdir = $(objdir)/tmpdir | |
442 | ||
d301e438 | 443 | site.exp: ./config.status Makefile |
3a9149a7 | 444 | @if [ -d $(testdir) ]; then true; else mkdir $(testdir); fi |
d301e438 | 445 | @echo "Making a new config file..." |
3a9149a7 | 446 | @rm -f ./tmp? |
d301e438 | 447 | @touch site.exp |
3a9149a7 | 448 | @mv site.exp site.bak |
d301e438 JW |
449 | @echo "## variables are automatically generated by make ##" > ./tmp0 |
450 | @echo "# Do not edit here. If you wish to override these" >> ./tmp0 | |
451 | @echo "# values, add them to the last section" >> ./tmp0 | |
3a9149a7 JW |
452 | @echo "# HOST AND TARGET INFO" >> ./tmp0 |
453 | @echo "set host_os $(host_os)" >> ./tmp0 | |
454 | @echo "set host_alias $(host_alias)" >> ./tmp0 | |
455 | @echo "set host_cpu $(host_cpu)" >> ./tmp0 | |
456 | @echo "set host_vendor $(host_vendor)" >> ./tmp0 | |
457 | @echo "set target_os $(target_os)" >> ./tmp0 | |
458 | @echo "set target_alias $(target_alias)" >> ./tmp0 | |
459 | @echo "set target_cpu $(target_cpu)" >> ./tmp0 | |
460 | @echo "set target_vendor $(target_vendor)" >> ./tmp0 | |
461 | @echo "set host_triplet $(host_canonical)" >> ./tmp0 | |
462 | @echo "set target_triplet $(target_canonical)" >> ./tmp0 | |
463 | @echo "# DIRECTORY INFO" >> ./tmp0 | |
d301e438 | 464 | @echo "set objdir `pwd`" >> ./tmp0 |
3a9149a7 | 465 | @echo "set tmpdir `cd $(testdir); pwd`" >> ./tmp0 |
d301e438 JW |
466 | @echo "" >> ./tmp0 |
467 | @echo "# LD DEPENDANCIES" >> ./tmp0 | |
3a9149a7 JW |
468 | @echo "set OFILES \"$(OFILES)\"" >> ./tmp0 |
469 | @echo "set BFDLIB \"$(BFDLIB)\"" >> ./tmp0 | |
470 | @echo "set LIBIBERTY \"$(LIBIBERTY)\"" >> ./tmp0 | |
471 | @echo "set HOSTING_EMU \"$(HOSTING_EMU)\"" >> ./tmp0 | |
472 | @echo "set HOSTING_CRT0 \"$(HOSTING_CRT0)\"" >> ./tmp0 | |
473 | @echo "set HOSTING_LIBS \"$(HOSTING_LIBS)\"" >> ./tmp0 | |
d301e438 JW |
474 | @echo "" >> ./tmp0 |
475 | @echo "## Variables generated by configure. Do Not Edit ##" >> ./tmp0 | |
476 | @cat ./tmp0 > site.exp | |
477 | @cat site.bak | sed \ | |
478 | -e '1,/^## Variables generated by.*##/ d' >> site.exp | |
479 | -@rm -f ./tmp? | |
8ddef552 | 480 | |
959eba20 | 481 | check: ld.new site.exp |
3a9149a7 JW |
482 | $(RUNTEST) --tool ld \ |
483 | --srcdir $(srcdir)/testsuite $(RUNTEST_FLAGS) \ | |
484 | CC="$(RUNTEST_CC)" CFLAGS="$(RUNTEST_CFLAGS)" \ | |
485 | CXX="$(RUNTEST_CXX)" CXXFLAGS="$(RUNTEST_CXXFLAGS)" | |
d301e438 | 486 | |
8ddef552 | 487 | installcheck: |
e7921bd4 | 488 | |
7e5c1057 | 489 | # Rules for testing by relinking ld itself. |
eb02fd64 | 490 | |
7e5c1057 | 491 | ld-partial.o: ld.new |
a04f1d00 | 492 | ./ld.new $(HOSTING_EMU) -o ld-partial.o -r $(OFILES) |
7e5c1057 | 493 | ld1: ld-partial.o |
a04f1d00 | 494 | ./ld.new $(HOSTING_EMU) -o ld1 $(HOSTING_CRT0) ld-partial.o $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) |
eb02fd64 | 495 | |
7e5c1057 | 496 | ld1-full: ld.new |
a04f1d00 | 497 | ./ld.new $(HOSTING_EMU) -o ld1-full $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) |
eb02fd64 | 498 | |
d20fb445 | 499 | ld2: ld1 |
a04f1d00 | 500 | ./ld1 $(HOSTING_EMU) -o ld2 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) |
60048a2c | 501 | |
eb02fd64 | 502 | ld3: ld2 |
a04f1d00 | 503 | ./ld2 $(HOSTING_EMU) -o ld3 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) |
eb02fd64 | 504 | |
d20fb445 SC |
505 | bootstrap: ld3 |
506 | cmp ld2 ld3 | |
507 | ||
8ddef552 DM |
508 | # A test program for C++ constructors and destructors. |
509 | ||
ef868186 | 510 | cdtest: cdtest-main.o cdtest-func.o cdtest-foo.o ld.new |
a04f1d00 | 511 | ./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \ |
917bffa7 PB |
512 | cdtest-main.o cdtest-func.o cdtest-foo.o $(HOSTING_LIBS) |
513 | ||
514 | check-cdtest: cdtest $(srcdir)/cdtest.exp | |
515 | ./cdtest >cdtest.out | |
516 | diff $(srcdir)/cdtest.exp cdtest.out | |
d301e438 | 517 | # END OF CHECK TARGETS |
917bffa7 | 518 | |
8073190b | 519 | # DOCUMENTATION TARGETS |
2412a768 RP |
520 | # Manual configuration file; not usually attached to normal configuration, |
521 | # because almost all configs use "gen" version of manual. | |
522 | # Set DOCVER above to change. | |
523 | configdoc.texi: ${DOCVER}-doc.texi | |
034351e3 PB |
524 | ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi || \ |
525 | ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi || \ | |
526 | cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi | |
2412a768 | 527 | |
8073190b | 528 | # TeX output |
2412a768 | 529 | dvi: ld.dvi |
959eba20 | 530 | ld.dvi: $(srcdir)/ld.texinfo $(srcdir)/configdoc.texi |
2412a768 RP |
531 | $(TEXI2DVI) $(srcdir)/ld.texinfo |
532 | ||
4b91c519 | 533 | ldint.dvi: $(srcdir)/ldint.texinfo |
2412a768 | 534 | $(TEXI2DVI) $(srcdir)/ldint.texinfo |
8d317d2a | 535 | |
8073190b | 536 | # info file for online browsing |
2412a768 | 537 | ld.info: $(srcdir)/ld.texinfo configdoc.texi |
959eba20 | 538 | $(MAKEINFO) -I$(BFDDIR)/doc -o ld.info $(srcdir)/ld.texinfo |
eb02fd64 | 539 | |
4b91c519 PB |
540 | ldint.info: $(srcdir)/ldint.texinfo |
541 | $(MAKEINFO) -o ldint.info $(srcdir)/ldint.texinfo | |
542 | ||
954ac2ea | 543 | #separate targets for "ms", "me", and "mm" forms of roff doc |
e06ba18d PB |
544 | # Try to use a recent texi2roff. v2 was put on prep in jan91. |
545 | # If you want an index, see texi2roff doc for postprocessing | |
546 | # and add -i to texi2roff invocations below. | |
547 | # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete | |
548 | # correspondint -e lines when later texi2roff's are current) | |
549 | # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs. | |
550 | # + @c's deleted explicitly because texi2roff sees texinfo commands in them | |
551 | # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank | |
552 | # + @alphaenumerate is ridiculously new, turned into @enumerate | |
553 | ||
9c7810d6 | 554 | ld.ms: $(srcdir)/ld.texinfo |
8073190b RP |
555 | sed -e '/\\input texinfo/d' \ |
556 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
e06ba18d PB |
557 | -e '/^@ifinfo/,/^@end ifinfo/d' \ |
558 | -e '/^@c/d' \ | |
559 | -e 's/{.*,,/{/' \ | |
560 | -e 's/@ / /g' \ | |
561 | -e 's/^@alphaenumerate/@enumerate/g' \ | |
562 | -e 's/^@end alphaenumerate/@end enumerate/g' \ | |
9c7810d6 | 563 | $(srcdir)/ld.texinfo | \ |
e06ba18d PB |
564 | $(TEXI2ROFF) $(TEXI2OPT) -ms | \ |
565 | sed -e 's/---/\\(em/g' \ | |
566 | >>ld.ms | |
8073190b RP |
567 | |
568 | # index for roff output | |
569 | ld-index.ms: ld.ms | |
570 | $(ROFF) -ms ld.ms 2>&1 1>/dev/null | \ | |
571 | sed -e '/: warning:/d' | \ | |
572 | texi2index >ld-index.ms | |
573 | ||
954ac2ea | 574 | # roff output (-mm) |
9c7810d6 | 575 | ld.mm: $(srcdir)/ld.texinfo |
954ac2ea RP |
576 | sed -e '/\\input texinfo/d' \ |
577 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
e06ba18d PB |
578 | -e '/^@ifinfo/,/^@end ifinfo/d' \ |
579 | -e '/^@c/d' \ | |
9c7810d6 RP |
580 | -e 's/{.*,,/{/' \ |
581 | -e '/@noindent/d' \ | |
e06ba18d PB |
582 | -e 's/@ / /g' \ |
583 | -e 's/^@alphaenumerate/@enumerate/g' \ | |
584 | -e 's/^@end alphaenumerate/@end enumerate/g' \ | |
9c7810d6 | 585 | $(srcdir)/ld.texinfo | \ |
e06ba18d | 586 | $(TEXI2ROFF) $(TEXI2OPT) -mm | \ |
9c7810d6 RP |
587 | sed -e 's/---/\\(em/g' \ |
588 | >ld.mm | |
954ac2ea RP |
589 | |
590 | # index for roff output | |
591 | ld-index.mm: ld.mm | |
592 | $(ROFF) -mm ld.mm 2>&1 1>/dev/null | \ | |
593 | sed -e '/: warning:/d' | \ | |
594 | texi2index >ld-index.mm | |
595 | ||
596 | # roff output (-me) | |
9c7810d6 | 597 | ld.me: $(srcdir)/ld.texinfo |
954ac2ea RP |
598 | sed -e '/\\input texinfo/d' \ |
599 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
e06ba18d PB |
600 | -e '/^@ifinfo/,/^@end ifinfo/d' \ |
601 | -e '/^@c/d' \ | |
602 | -e 's/{.*,,/{/' \ | |
603 | -e 's/@ / /g' \ | |
604 | -e 's/^@alphaenumerate/@enumerate/g' \ | |
605 | -e 's/^@end alphaenumerate/@end enumerate/g' \ | |
9c7810d6 | 606 | $(srcdir)/ld.texinfo | \ |
e06ba18d PB |
607 | $(TEXI2ROFF) $(TEXI2OPT) -me | \ |
608 | sed -e 's/---/\\(em/g' \ | |
609 | >>ld.me | |
954ac2ea RP |
610 | |
611 | # index for roff output | |
612 | ld-index.me: ld.me | |
613 | $(ROFF) -me ld.me 2>&1 1>/dev/null | \ | |
614 | sed -e '/: warning:/d' | \ | |
615 | texi2index >ld-index.me | |
616 | ||
e7921bd4 | 617 | stage1: force |
e06ba18d | 618 | -mkdir stage1 |
ab57b174 | 619 | -mv -f $(STAGESTUFF) $(LD_PROG) stage1 |
e06ba18d | 620 | -(cd stage1 ; ln -s $(LD_PROG) ld) |
f78e2569 | 621 | |
e7921bd4 | 622 | stage2: force |
e06ba18d | 623 | -mkdir stage2 |
ab57b174 | 624 | -mv -f $(STAGESTUFF) $(LD_PROG) stage2 |
e06ba18d | 625 | -(cd stage2 ; ln -s $(LD_PROG) ld) |
f78e2569 | 626 | |
e7921bd4 | 627 | stage3: force |
e06ba18d | 628 | -mkdir stage3 |
ab57b174 | 629 | -mv -f $(STAGESTUFF) $(LD_PROG) stage3 |
e06ba18d | 630 | -(cd stage3 ; ln -s $(LD_PROG) ld) |
eb02fd64 | 631 | |
e46cdcdd RP |
632 | against=stage2 |
633 | ||
634 | comparison: force | |
ab57b174 | 635 | for i in $(STAGESTUFF) $(LD_PROG) ; do cmp $$i $(against)/$$i ; done |
e46cdcdd | 636 | |
e7921bd4 | 637 | de-stage1: force |
e06ba18d PB |
638 | -(cd stage1 ; mv -f * ..) |
639 | -rm ld | |
640 | -rmdir stage1 | |
e7921bd4 RP |
641 | |
642 | de-stage2: force | |
e06ba18d PB |
643 | -(cd stage2 ; mv -f * ..) |
644 | -rm ld | |
645 | -rmdir stage2 | |
e7921bd4 RP |
646 | |
647 | de-stage3: force | |
e06ba18d PB |
648 | -(cd stage3 ; mv -f * ..) |
649 | -rm ld | |
650 | -rmdir stage3 | |
e7921bd4 | 651 | |
ab57b174 | 652 | # Stuff that should be included in a distribution: |
63545898 | 653 | LDDISTSTUFF=ldgram.c ldgram.h ldlex.c |
ab57b174 ILT |
654 | diststuff: $(LDDISTSTUFF) |
655 | ||
656 | mostlyclean: | |
657 | -rm -f $(STAGESTUFF) ld.?? ld.??? ldlex.[qp] | |
917bffa7 | 658 | -rm -f ld ld1 ld2 ld3 *.o y.output cdtest cdtest.out |
ab57b174 ILT |
659 | clean: mostlyclean |
660 | -rm -f $(LD_PROG) | |
661 | distclean: clean | |
d301e438 | 662 | -rm -fr Makefile config.status TAGS sysdep.h ldscripts site.exp |
ab57b174 ILT |
663 | realclean: distclean |
664 | -rm -f $(LDDISTSTUFF) | |
eb02fd64 RP |
665 | |
666 | lintlog:$(SOURCES) Makefile | |
2ee11735 | 667 | $(LINT) -abhxzn $(LINTFLAGS) $(LINTSOURCES) \ |
eb02fd64 RP |
668 | | grep -v "pointer casts may be troublesome" \ |
669 | | grep -v "possible pointer alignment problem" \ | |
670 | | grep -v "ignore" \ | |
671 | | grep -v "conversion from long may lose accuracy" \ | |
672 | | grep -v "warning: constant argument to NOT" \ | |
673 | | grep -v "enumeration type clash, operator CAST" \ | |
674 | | grep -v "warning: constant in conditional context"\ | |
675 | | grep -v "archive\.c" | |
676 | ||
677 | ||
cbb5c2d1 DM |
678 | TAGS: |
679 | etags -t $(srcdir)/*.[chly] *.[chly] | |
eb02fd64 | 680 | |
eb02fd64 | 681 | |
12fa72d4 | 682 | .PHONY: install |
91b3a2b6 | 683 | install: |
8ddef552 DM |
684 | $(INSTALL_XFORM) ld.new $(bindir)/ld |
685 | $(INSTALL_XFORM1) $(srcdir)/ld.1 $(man1dir)/ld.1 | |
173a0c3d DM |
686 | for f in ldscripts/*; do \ |
687 | $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \ | |
d360d135 | 688 | done |
9cd039e7 | 689 | -n=`t='$(program_transform_name)'; echo ld | sed -e "" $$t`; \ |
56409445 ILT |
690 | rm -f $(tooldir)/bin/ld; \ |
691 | ln $(bindir)/$$n $(tooldir)/bin/ld \ | |
e357065c | 692 | || $(INSTALL_PROGRAM) ld.new $(tooldir)/bin/ld |
e06ba18d | 693 | |
91b3a2b6 | 694 | install-info: |
afe3aa73 | 695 | for i in ld.info* ; do \ |
e06ba18d | 696 | $(INSTALL_DATA) $$i $(infodir)/$$i ; \ |
afe3aa73 RP |
697 | done |
698 | ||
12fa72d4 SC |
699 | clean-info: |
700 | -rm -rf *.info* | |
701 | ||
eb02fd64 RP |
702 | #----------------------------------------------------------------------------- |
703 | # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT | |
704 | # | |
705 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
706 | #----------------------------------------------------------------------------- | |
707 | ||
708 | ver960.c: FORCE | |
709 | rm -f ver960.c | |
710 | echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c | |
711 | ||
712 | ||
713 | # This target should be invoked before building a new release. | |
714 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
715 | # | |
716 | roll: | |
717 | @V=`cat VERSION` ; \ | |
718 | MAJ=`sed 's/\..*//' VERSION` ; \ | |
719 | MIN=`sed 's/.*\.//' VERSION` ; \ | |
720 | V=$$MAJ.`expr $$MIN + 1` ; \ | |
721 | rm -f VERSION ; \ | |
722 | echo $$V >VERSION ; \ | |
723 | echo Version $$V | |
724 | ||
239d28f3 | 725 | |
e1e5fbfc | 726 | dep: $(LDSOURCES) |
239d28f3 SC |
727 | mkdep $(CFLAGS) $? |
728 | ||
eb02fd64 RP |
729 | # Dummy target to force execution of dependent targets. |
730 | # | |
e7921bd4 | 731 | force: |
eb02fd64 RP |
732 | |
733 | # Target to uncomment host-specific lines in this makefile. Such lines must | |
734 | # have the following string beginning in column 1: #__<hostname>__# | |
735 | # Original Makefile is backed up as 'Makefile.old'. | |
736 | # | |
737 | # Invoke with: make make HOST=xxx | |
738 | # | |
739 | make: | |
740 | -@if test $(HOST)x = x ; then \ | |
741 | echo '\aSpecify "make make HOST=???"'; \ | |
742 | exit 1; \ | |
743 | fi ; \ | |
744 | grep -s "^#The next line was generated by 'make make'" Makefile; \ | |
745 | if test $$? = 0 ; then \ | |
746 | echo "\aMakefile has already been processed with 'make make'";\ | |
747 | exit 1; \ | |
748 | fi ; \ | |
749 | mv -f Makefile Makefile.old; \ | |
750 | echo "#The next line was generated by 'make make'" >Makefile ; \ | |
751 | echo "HOST=$(HOST)" >>Makefile ; \ | |
752 | echo >>Makefile ; \ | |
753 | sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile | |
754 | ||
755 | #\f | |
756 | ||
f1eb48b6 | 757 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) |
a26878d1 | 758 | $(SHELL) ./config.status |
eb02fd64 | 759 | |
eb02fd64 | 760 | ### mode:fundamental *** |
e06ba18d | 761 | ### Local Variables: *** |
eb02fd64 RP |
762 | ### page-delimiter: "^#\f" *** |
763 | ### End: *** | |
764 | ### end of file | |
239d28f3 SC |
765 | |
766 | ||
767 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |