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