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