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