1 # Makefile for the GNU linker ld (version 2)
2 # Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1997
3 # Free Software Foundation, Inc.
5 # This file is part of GNU ld.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 target_alias
= @target_alias@
29 program_transform_name
= @program_transform_name@
30 exec_prefix = @
exec_prefix@
33 tooldir
= $(exec_prefix)/$(target_alias
)
36 man1dir = $(mandir)/man1
37 man2dir = $(mandir)/man2
38 man3dir = $(mandir)/man3
39 man4dir = $(mandir)/man4
40 man5dir = $(mandir)/man5
41 man6dir = $(mandir)/man6
42 man7dir = $(mandir)/man7
43 man8dir = $(mandir)/man8
44 man9dir = $(mandir)/man9
46 includedir = @
includedir@
48 # We put the scripts in the directory $(scriptdir)/ldscripts.
49 # We can't put the scripts in $(datadir) because the SEARCH_DIR
50 # directives need to be different for native and cross linkers.
51 scriptdir
= $(tooldir
)/lib
55 INSTALL
= `cd $(srcdir); pwd`/..
/install.sh
-c
56 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
57 INSTALL_DATA
= @INSTALL_DATA@
58 INSTALL_XFORM
= $(INSTALL
) -t
='$(program_transform_name)'
59 INSTALL_XFORM1
= $(INSTALL_XFORM
) -b
=.1
68 RPATH_ENVVAR
= @RPATH_ENVVAR@
72 BISON
= `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
73 LEX
= `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
76 EMULATION_OFILES
= @EMULATION_OFILES@
78 # Search path to override the default search path for -lfoo libraries.
79 # If LIB_PATH is empty, the ones in the script (if any) are left alone.
80 # (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
81 # a cross-linker, in which case the default is empty. See genscripts.sh.)
82 # Otherwise, they are replaced with the ones given in LIB_PATH,
83 # which may have the form: LIB_PATH=/lib:/usr/local/lib
86 BASEDIR
= $(srcdir)/..
87 BFDDIR
= $(BASEDIR
)/bfd
88 INCDIR
= $(BASEDIR
)/include
89 INCLUDES
= -I.
-I
$(srcdir) -I..
/bfd
-I
$(BFDDIR
) -I
$(INCDIR
)
92 # What version of the manual to build
95 # Where to find texinfo.tex to format docn with TeX
96 TEXIDIR
= $(srcdir)/..
/texinfo
98 # Where to find other docs needed to format with TeX
99 TEXINPUTS
= $(TEXIDIR
):$(BFDDIR
)/doc
:$(srcdir)
101 # Whether to get roff to put indexing entries on stderr
103 # You neeed this to generate ld-index.ms (or .mm or .me)
108 # Which roff program to use to generate index for texi2roff'd doc
111 #stuff for self hosting (can be overridden in config file).
112 HOSTING_CRT0
= @HOSTING_CRT0@
113 HOSTING_LIBS
= @HOSTING_LIBS@
114 HOSTING_EMU
= -m
$(EMUL
)
116 # These were used by `make check-cdtest'
118 #CXX = `if [ -f ../gcc/xgcc ] ; then \
119 # echo ../gcc/xgcc -B../gcc/; \
122 #CXXFLAGS = -fgnu-linker
124 # FIX_ME: using ../gcc/xgcc breaks the cdtest.
127 # Setup the testing framework, if you have one
128 EXPECT
= `if [ -f $$r/../expect/expect ] ; \
129 then echo $$r/../expect/expect ; \
130 else echo expect ; fi`
132 RUNTEST
= `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
133 then echo $${srcroot}/../dejagnu/runtest ; \
134 else echo runtest ; fi`
139 if [ -f $$r/../gcc/xgcc ] ; then \
140 if [ -f $$r/../newlib/Makefile ] ; then \
141 echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
143 echo $$r/../gcc/xgcc -B$$r/../gcc/; \
146 if [ "@host@" = "@target@" ] ; then \
149 echo gcc | sed '$(program_transform_name)'; \
155 if [ -f $$r/../gcc/xgcc ] ; then \
156 if [ -f $$r/../newlib/Makefile ] ; then \
157 echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
159 echo $$r/../gcc/xgcc -B$$r/../gcc/; \
162 if [ "@host@" = "@target@" ] ; then \
165 echo gcc | sed '$(program_transform_name)'; \
169 # go directly to ld.new in case this ld isn't capable of
170 # linking native object on this host. It can be renamed on
177 LINTFLAGS
= $(INCLUDES
) $(EXTRA_DEF
)
179 # The .cc suffix was used by `make check-cdtest'.
181 .SUFFIXES
: .y
$(SUFFIXES
) .
cc
183 # Suppress smart makes who think they know how to automake Yacc files
186 # This rule was used for the check-cdtest target.
188 # $(CXX) -c -I$(srcdir) $(CXXFLAGS) $(CFLAGS) $<
190 ALL_CFLAGS
= -D_GNU_SOURCE
$(INCLUDES
) @HDEFINES@
$(CFLAGS
)
192 $(CC
) -c
$(ALL_CFLAGS
) $<
194 BFDDEP
= ..
/bfd
/libbfd.a
196 LIBIBERTY
= ..
/libiberty
/libiberty.a
289 ALL_64_EMULATIONS
= \
292 CFILES
= ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
293 ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
296 HFILES
= config.h
ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
297 ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
300 GENERATED_CFILES
= ldgram.c ldlex.c
301 GENERATED_HFILES
= ldgram.h ldemul-list.h
303 OFILES
= ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
304 ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
305 ldfile.o ldcref.o
${EMULATION_OFILES}
307 LINTSOURCES
= $(CFILES
) $(GENERATED_CFILES
) e
*.c
309 STAGESTUFF
= *.o ldscripts
/* e
*.c
315 $(BISON
) $(BISONFLAGS
) -d
$(srcdir)/ldgram.y
316 mv
-f y.tab.c ldgram.c
317 mv
-f y.tab.h ldgram.h
319 # Separate from ldgram.c so that a parallel make doesn't try to build
320 # both ldgram.c and ldgram.h simultaneously.
323 ldmain.o
: ldmain.c config.status
324 $(CC
) -c
-DDEFAULT_EMULATION
='"$(EMUL)"' -DSCRIPTDIR
='"$(scriptdir)"' -DTARGET
='"@target@"' $(ALL_CFLAGS
) $<
326 ldemul-list.h
: Makefile
327 (echo
"/* This file is automatically generated. DO NOT EDIT! */";\
328 for f in
`echo " " ${EMULATION_OFILES} "" \
329 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
330 echo
"extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
333 echo
"#define EMULATION_LIST \\";\
334 for f in
`echo " " ${EMULATION_OFILES} "" \
335 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
336 echo
" &ld_$${f}_emulation, \\"; \
338 echo
" 0") >ldemul-tmp.h
339 mv ldemul-tmp.h ldemul-list.h
342 $(LEX
) $(srcdir)/ldlex.l
343 -sed
-e
'/^int.*free();/d' \
344 -e
'/^char.*malloc();/d' \
345 -e
's/malloc/xmalloc/g' \
346 < lex.yy.c
> ldlex.c.new
348 mv ldlex.c.new .
/ldlex.c
350 # These all start with e so 'make clean' can find them.
352 GENSCRIPTS
= $(SHELL
) $(srcdir)/genscripts.sh
${srcdir} ${libdir} @host@ @target@ @target_alias@
${EMUL} "@NATIVE_LIB_DIRS@"
353 GEN_DEPENDS
= $(srcdir)/genscripts.sh
$(srcdir)/emultempl
/stringify.sed
356 ea29k.c
: $(srcdir)/emulparams
/a29k.sh \
357 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/a29k.sc
${GEN_DEPENDS}
358 ${GENSCRIPTS} a29k
"$(tdir_a29k)"
359 eaixppc.c
: $(srcdir)/emulparams
/aixppc.sh \
360 $(srcdir)/emultempl
/aix.em
$(srcdir)/scripttempl
/aix.sc
${GEN_DEPENDS}
361 ${GENSCRIPTS} aixppc
"$(tdir_aixppc)"
362 eaixrs6.c
: $(srcdir)/emulparams
/aixrs6.sh \
363 $(srcdir)/emultempl
/aix.em
$(srcdir)/scripttempl
/aix.sc
${GEN_DEPENDS}
364 ${GENSCRIPTS} aixrs6
"$(tdir_aixrs6)"
365 ealpha.c
: $(srcdir)/emulparams
/alpha.sh \
366 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/alpha.sc
${GEN_DEPENDS}
367 ${GENSCRIPTS} alpha
"$(tdir_alpha)"
369 earcelf.c
: $(srcdir)/emulparams
/arcelf.sh \
370 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
371 ${GENSCRIPTS} arcelf
"$(tdir_arcelf)"
373 earmaoutb.c
: $(srcdir)/emulparams
/armaoutb.sh \
374 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/armaout.sc
${GEN_DEPENDS}
375 ${GENSCRIPTS} armaoutb
"$(tdir_armaoutb)"
376 earmaoutl.c
: $(srcdir)/emulparams
/armaoutl.sh \
377 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/armaout.sc
${GEN_DEPENDS}
378 ${GENSCRIPTS} armaoutl
"$(tdir_armaoutl)"
379 earmcoff.c
: $(srcdir)/emulparams
/armcoff.sh \
380 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/armcoff.sc
${GEN_DEPENDS}
381 ${GENSCRIPTS} armcoff
"$(tdir_armcoff)"
382 earmpe.c
: $(srcdir)/emulparams
/armpe.sh \
383 $(srcdir)/emultempl
/pe.em
$(srcdir)/scripttempl
/pe.sc
${GEN_DEPENDS}
384 ${GENSCRIPTS} armpe
"$(tdir_armpe)"
385 ecoff_sparc.c
: $(srcdir)/emulparams
/coff_sparc.sh \
386 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/sparccoff.sc
${GEN_DEPENDS}
387 ${GENSCRIPTS} coff_sparc
"$(tdir_coff_sparc)"
388 ed10velf.c
: $(srcdir)/emulparams
/d10velf.sh \
389 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/elfd10v.sc
${GEN_DEPENDS}
390 ${GENSCRIPTS} d10velf
"$(tdir_d10v)"
391 # start-sanitize-d30v
392 ed30velf.c
: $(srcdir)/emulparams
/d30velf.sh \
393 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/elfd30v.sc
${GEN_DEPENDS}
394 ${GENSCRIPTS} d30velf
"$(tdir_d30v)"
396 edelta68.c
: $(srcdir)/emulparams
/delta68.sh \
397 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/delta68.sc
${GEN_DEPENDS}
398 ${GENSCRIPTS} delta68
"$(tdir_delta68)"
399 eebmon29k.c
: $(srcdir)/emulparams
/ebmon29k.sh \
400 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/ebmon29k.sc
${GEN_DEPENDS}
401 ${GENSCRIPTS} ebmon29k
"$(tdir_ebmon29k)"
402 # start-sanitize-m32r
403 em32relf.c
: $(srcdir)/emulparams
/m32relf.sh \
404 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
405 ${GENSCRIPTS} m32relf
"$(tdir_m32r)"
407 eelf32_sparc.c
: $(srcdir)/emulparams
/elf32_sparc.sh \
408 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
409 ${GENSCRIPTS} elf32_sparc
"$(tdir_elf32_sparc)"
410 eelf32b4300.c
: $(srcdir)/emulparams
/elf32b4300.sh \
411 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
412 ${GENSCRIPTS} elf32b4300
"$(tdir_elf32b4300)"
413 eelf32bmip.c
: $(srcdir)/emulparams
/elf32bmip.sh \
414 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elfmips.sc
${GEN_DEPENDS}
415 ${GENSCRIPTS} elf32bmip
"$(tdir_elf32bmip)"
416 eelf32ebmip.c
: $(srcdir)/emulparams
/elf32ebmip.sh \
417 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elfmips.sc
${GEN_DEPENDS}
418 ${GENSCRIPTS} elf32ebmip
"$(tdir_elf32ebmip)"
419 eelf32elmip.c
: $(srcdir)/emulparams
/elf32elmip.sh \
420 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elfmips.sc
${GEN_DEPENDS}
421 ${GENSCRIPTS} elf32elmip
"$(tdir_elf32elmip)"
422 eelf32l4300.c
: $(srcdir)/emulparams
/elf32l4300.sh \
423 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
424 ${GENSCRIPTS} elf32l4300
"$(tdir_elf32l4300)"
425 eelf32lmip.c
: $(srcdir)/emulparams
/elf32lmip.sh \
426 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elfmips.sc
${GEN_DEPENDS}
427 ${GENSCRIPTS} elf32lmip
"$(tdir_elf32lmip)"
428 eelf32lppc.c
: $(srcdir)/emulparams
/elf32lppc.sh \
429 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elfppc.sc
${GEN_DEPENDS}
430 ${GENSCRIPTS} elf32lppc
"$(tdir_elf32lppc)"
431 eelf32ppc.c
: $(srcdir)/emulparams
/elf32ppc.sh \
432 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elfppc.sc
${GEN_DEPENDS}
433 ${GENSCRIPTS} elf32ppc
"$(tdir_elf32ppc)"
434 eelf64alpha.c
: $(srcdir)/emulparams
/elf64alpha.sh \
435 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
436 ${GENSCRIPTS} elf64alpha
"$(tdir_elf64alpha)"
437 eelf64_sparc.c
: $(srcdir)/emulparams
/elf64_sparc.sh \
438 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
439 ${GENSCRIPTS} elf64_sparc
"$(tdir_elf64_sparc)"
440 eelf_i386.c
: $(srcdir)/emulparams
/elf_i386.sh \
441 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
442 ${GENSCRIPTS} elf_i386
"$(tdir_elf_i386)"
443 egld960.c
: $(srcdir)/emulparams
/gld960.sh \
444 $(srcdir)/emultempl
/gld960.em
$(srcdir)/scripttempl
/i960.sc
${GEN_DEPENDS}
445 ${GENSCRIPTS} gld960
"$(tdir_gld960)"
446 egld960coff.c
: $(srcdir)/emulparams
/gld960coff.sh \
447 $(srcdir)/emultempl
/gld960c.em
$(srcdir)/scripttempl
/i960.sc
${GEN_DEPENDS}
448 ${GENSCRIPTS} gld960coff
"$(tdir_gld960coff)"
449 ego32.c
: $(srcdir)/emulparams
/go32.sh \
450 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
451 ${GENSCRIPTS} go32
"$(tdir_go32)"
452 eh8300.c
: $(srcdir)/emulparams
/h8300.sh \
453 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/h8300.sc
${GEN_DEPENDS}
454 ${GENSCRIPTS} h8300
"$(tdir_h8300)"
455 eh8300h.c
: $(srcdir)/emulparams
/h8300h.sh \
456 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/h8300h.sc
${GEN_DEPENDS}
457 ${GENSCRIPTS} h8300h
"$(tdir_h8300h)"
458 eh8300s.c
: $(srcdir)/emulparams
/h8300s.sh \
459 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/h8300s.sc
${GEN_DEPENDS}
460 ${GENSCRIPTS} h8300s
"$(tdir_h8300s)"
461 eh8500.c
: $(srcdir)/emulparams
/h8500.sh \
462 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/h8500.sc
${GEN_DEPENDS}
463 ${GENSCRIPTS} h8500
"$(tdir_h8500)"
464 eh8500b.c
: $(srcdir)/emulparams
/h8500b.sh \
465 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/h8500b.sc
${GEN_DEPENDS}
466 ${GENSCRIPTS} h8500b
"$(tdir_h8500b)"
467 eh8500c.c
: $(srcdir)/emulparams
/h8500c.sh \
468 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/h8500c.sc
${GEN_DEPENDS}
469 ${GENSCRIPTS} h8500c
"$(tdir_h8500c)"
470 eh8500m.c
: $(srcdir)/emulparams
/h8500m.sh \
471 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/h8500m.sc
${GEN_DEPENDS}
472 ${GENSCRIPTS} h8500m
"$(tdir_h8500m)"
473 eh8500s.c
: $(srcdir)/emulparams
/h8500s.sh \
474 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/h8500s.sc
${GEN_DEPENDS}
475 ${GENSCRIPTS} h8500s
"$(tdir_h8500s)"
476 ehp300bsd.c
: $(srcdir)/emulparams
/hp300bsd.sh \
477 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
478 ${GENSCRIPTS} hp300bsd
"$(tdir_hp300bsd)"
479 ehp3hpux.c
: $(srcdir)/emulparams
/hp3hpux.sh \
480 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
481 ${GENSCRIPTS} hp3hpux
"$(tdir_hp3hpux)"
482 ehppaelf.c
: $(srcdir)/emulparams
/hppaelf.sh \
483 $(srcdir)/emultempl
/hppaelf.em
$(srcdir)/scripttempl
/hppaelf.sc
${GEN_DEPENDS}
484 ${GENSCRIPTS} hppaelf
"$(tdir_hppaelf)"
485 ei386aout.c
: $(srcdir)/emulparams
/i386aout.sh \
486 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
487 ${GENSCRIPTS} i386aout
"$(tdir_i386aout)"
488 ei386bsd.c
: $(srcdir)/emulparams
/i386bsd.sh \
489 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
490 ${GENSCRIPTS} i386bsd
"$(tdir_i386bsd)"
491 ei386coff.c
: $(srcdir)/emulparams
/i386coff.sh \
492 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/i386coff.sc
${GEN_DEPENDS}
493 ${GENSCRIPTS} i386coff
"$(tdir_i386coff)"
494 ei386go32.c
: $(srcdir)/emulparams
/i386go32.sh \
495 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/i386go32.sc
${GEN_DEPENDS}
496 ${GENSCRIPTS} i386go32
"$(tdir_i386go32)"
497 ei386linux.c
: $(srcdir)/emulparams
/i386linux.sh \
498 $(srcdir)/emultempl
/linux.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
499 ${GENSCRIPTS} i386linux
"$(tdir_i386linux)"
500 ei386lynx.c
: $(srcdir)/emulparams
/i386lynx.sh \
501 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/i386lynx.sc
${GEN_DEPENDS}
502 ${GENSCRIPTS} i386lynx
"$(tdir_i386lynx)"
503 ei386mach.c
: $(srcdir)/emulparams
/i386mach.sh \
504 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
505 ${GENSCRIPTS} i386mach
"$(tdir_i386mach)"
506 ei386moss.c
: $(srcdir)/emulparams
/i386moss.sh \
507 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
508 ${GENSCRIPTS} i386moss
"$(tdir_i386moss)"
509 ei386msdos.c
: $(srcdir)/emulparams
/i386msdos.sh \
510 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/i386msdos.sc
${GEN_DEPENDS}
511 ${GENSCRIPTS} i386msdos
"$(tdir_i386msdos)"
512 ei386nbsd.c
: $(srcdir)/emulparams
/i386nbsd.sh \
513 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
514 ${GENSCRIPTS} i386nbsd
"$(tdir_i386nbsd)"
515 ei386nw.c
: $(srcdir)/emulparams
/i386nw.sh \
516 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/nw.sc
${GEN_DEPENDS}
517 ${GENSCRIPTS} i386nw
"$(tdir_i386nw)"
518 ei386pe.c
: $(srcdir)/emulparams
/i386pe.sh \
519 $(srcdir)/emultempl
/pe.em
$(srcdir)/scripttempl
/pe.sc
${GEN_DEPENDS}
520 ${GENSCRIPTS} i386pe
"$(tdir_i386pe)"
521 elnk960.c
: $(srcdir)/emulparams
/lnk960.sh \
522 $(srcdir)/emultempl
/lnk960.em
$(srcdir)/scripttempl
/i960.sc
${GEN_DEPENDS}
523 ${GENSCRIPTS} lnk960
"$(tdir_lnk960)"
524 em68k4knbsd.c
: $(srcdir)/emulparams
/m68k4knbsd.sh \
525 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
526 ${GENSCRIPTS} m68k4knbsd
"$(tdir_m68k4knbsd)"
527 em68kaout.c
: $(srcdir)/emulparams
/m68kaout.sh \
528 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
529 ${GENSCRIPTS} m68kaout
"$(tdir_m68kaout)"
530 em68kaux.c
: $(srcdir)/emulparams
/m68kaux.sh \
531 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/m68kaux.sc
${GEN_DEPENDS}
532 ${GENSCRIPTS} m68kaux
"$(tdir_m68kaux)"
533 em68kcoff.c
: $(srcdir)/emulparams
/m68kcoff.sh \
534 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/m68kcoff.sc
${GEN_DEPENDS}
535 ${GENSCRIPTS} m68kcoff
"$(tdir_m68kcoff)"
536 em68kelf.c
: $(srcdir)/emulparams
/m68kelf.sh \
537 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
538 ${GENSCRIPTS} m68kelf
"$(tdir_m68kelf)"
539 em68klinux.c
: $(srcdir)/emulparams
/m68klinux.sh \
540 $(srcdir)/emultempl
/linux.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
541 ${GENSCRIPTS} m68klinux
"$(tdir_m68klinux)"
542 em68klynx.c
: $(srcdir)/emulparams
/m68klynx.sh \
543 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/m68klynx.sc
${GEN_DEPENDS}
544 ${GENSCRIPTS} m68klynx
"$(tdir_m68klynx)"
545 em68knbsd.c
: $(srcdir)/emulparams
/m68knbsd.sh \
546 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
547 ${GENSCRIPTS} m68knbsd
"$(tdir_m68knbsd)"
548 em68kpsos.c
: $(srcdir)/emulparams
/m68kpsos.sh \
549 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/psos.sc
${GEN_DEPENDS}
550 ${GENSCRIPTS} m68kpsos
"$(tdir_m68kpsos)"
551 em88kbcs.c
: $(srcdir)/emulparams
/m88kbcs.sh \
552 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/m88kbcs.sc
${GEN_DEPENDS}
553 ${GENSCRIPTS} m88kbcs
"$(tdir_m88kbcs)"
554 emipsbig.c
: $(srcdir)/emulparams
/mipsbig.sh \
555 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/mips.sc
${GEN_DEPENDS}
556 ${GENSCRIPTS} mipsbig
557 emipsbsd.c
: $(srcdir)/emulparams
/mipsbsd.sh \
558 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/mipsbsd.sc
${GEN_DEPENDS}
559 ${GENSCRIPTS} mipsbsd
560 emipsidt.c
: $(srcdir)/emulparams
/mipsidt.sh \
561 $(srcdir)/emultempl
/mipsecoff.em
$(srcdir)/scripttempl
/mips.sc
${GEN_DEPENDS}
562 ${GENSCRIPTS} mipsidt
"$(tdir_mipsidt)"
563 emipsidtl.c
: $(srcdir)/emulparams
/mipsidtl.sh \
564 $(srcdir)/emultempl
/mipsecoff.em
$(srcdir)/scripttempl
/mips.sc
${GEN_DEPENDS}
565 ${GENSCRIPTS} mipsidtl
"$(tdir_mipsidtl)"
566 emipslit.c
: $(srcdir)/emulparams
/mipslit.sh \
567 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/mips.sc
${GEN_DEPENDS}
568 ${GENSCRIPTS} mipslit
"$(tdir_mipslit)"
569 emipslnews.c
: $(srcdir)/emulparams
/mipslnews.sh \
570 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/mips.sc
${GEN_DEPENDS}
571 ${GENSCRIPTS} mipslnews
572 emn10300.c
: $(srcdir)/emulparams
/mn10300.sh \
573 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
574 ${GENSCRIPTS} mn10300
"$(tdir_mn10300)"
575 emn10200.c
: $(srcdir)/emulparams
/mn10200.sh \
576 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
577 ${GENSCRIPTS} mn10200
"$(tdir_mn10200)"
578 enews.c
: $(srcdir)/emulparams
/news.sh \
579 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
580 ${GENSCRIPTS} news
"$(tdir_news)"
581 ens32knbsd.c
: $(srcdir)/emulparams
/ns32knbsd.sh \
582 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
583 ${GENSCRIPTS} ns32knbsd
"$(tdir_ns32knbsd)"
584 epc532macha.c
: $(srcdir)/emulparams
/pc532macha.sh \
585 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
586 ${GENSCRIPTS} pc532macha
"$(tdir_pc532macha)"
587 eppcmacos.c
: $(srcdir)/emulparams
/ppcmacos.sh \
588 $(srcdir)/emultempl
/aix.em
$(srcdir)/scripttempl
/aix.sc
${GEN_DEPENDS}
589 ${GENSCRIPTS} ppcmacos
"$(tdir_ppcmacos)"
590 eppcnw.c
: $(srcdir)/emulparams
/ppcnw.sh \
591 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/nw.sc
${GEN_DEPENDS}
592 ${GENSCRIPTS} ppcnw
"$(tdir_ppcnw)"
593 eppcpe.c
: $(srcdir)/emulparams
/ppcpe.sh \
594 $(srcdir)/emultempl
/pe.em
$(srcdir)/scripttempl
/ppcpe.sc
${GEN_DEPENDS}
595 ${GENSCRIPTS} ppcpe
"$(tdir_ppcpe)"
596 eriscix.c
: $(srcdir)/emulparams
/riscix.sh \
597 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
598 ${GENSCRIPTS} riscix
"$(tdir_riscix)"
599 esa29200.c
: $(srcdir)/emulparams
/sa29200.sh \
600 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/sa29200.sc
${GEN_DEPENDS}
601 ${GENSCRIPTS} sa29200
"$(tdir_sa29200)"
602 esh.c
: $(srcdir)/emulparams
/sh.sh \
603 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/sh.sc
${GEN_DEPENDS}
604 ${GENSCRIPTS} sh
"$(tdir_sh)"
605 eshelf.c
: $(srcdir)/emulparams
/shelf.sh \
606 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
607 ${GENSCRIPTS} shelf
"$(tdir_shelf)"
608 eshlelf.c
: $(srcdir)/emulparams
/shlelf.sh \
609 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/elf.sc
${GEN_DEPENDS}
610 ${GENSCRIPTS} shlelf
"$(tdir_shlelf)"
611 eshl.c
: $(srcdir)/emulparams
/shl.sh \
612 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/sh.sc
${GEN_DEPENDS}
613 ${GENSCRIPTS} shl
"$(tdir_shl)"
614 esparcaout.c
: $(srcdir)/emulparams
/sparcaout.sh \
615 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
616 ${GENSCRIPTS} sparcaout
"$(tdir_sparcaout)"
617 esparclynx.c
: $(srcdir)/emulparams
/sparclynx.sh \
618 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/sparclynx.sc
${GEN_DEPENDS}
619 ${GENSCRIPTS} sparclynx
"$(tdir_sparclynx)"
620 esparcnbsd.c
: $(srcdir)/emulparams
/sparcnbsd.sh \
621 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
622 ${GENSCRIPTS} sparcnbsd
"$(tdir_sparcnbsd)"
623 est2000.c
: $(srcdir)/emulparams
/st2000.sh \
624 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/st2000.sc
${GEN_DEPENDS}
625 ${GENSCRIPTS} st2000
"$(tdir_st2000)"
626 esun3.c
: $(srcdir)/emulparams
/sun3.sh \
627 $(srcdir)/emultempl
/sunos.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
628 ${GENSCRIPTS} sun3
"$(tdir_sun3)"
629 esun4.c
: $(srcdir)/emulparams
/sun4.sh \
630 $(srcdir)/emultempl
/sunos.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
631 ${GENSCRIPTS} sun4
"$(tdir_sun4)"
632 # start-sanitize-tic80
633 etic80coff.c
: $(srcdir)/emulparams
/tic80coff.sh \
634 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/tic80coff.sc
${GEN_DEPENDS}
635 ${GENSCRIPTS} tic80coff
"$(tdir_tic80coff)"
637 evanilla.c
: $(srcdir)/emulparams
/vanilla.sh \
638 $(srcdir)/emultempl
/vanilla.em
$(srcdir)/scripttempl
/vanilla.sc
${GEN_DEPENDS}
639 ${GENSCRIPTS} vanilla
"$(tdir_vanilla)"
640 evax.c
: $(srcdir)/emulparams
/vax.sh \
641 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
642 ${GENSCRIPTS} vax
"$(tdir_vax)"
643 evsta.c
: $(srcdir)/emulparams
/vsta.sh \
644 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/aout.sc
${GEN_DEPENDS}
645 ${GENSCRIPTS} vsta
"$(tdir_vsta)"
646 # start-sanitize-v850
647 ev850.c
: $(srcdir)/emulparams
/v850.sh \
648 $(srcdir)/emultempl
/elf32.em
$(srcdir)/scripttempl
/v850.sc
${GEN_DEPENDS}
649 ${GENSCRIPTS} v850
"$(tdir_v850)"
651 ew65.c
: $(srcdir)/emulparams
/w65.sh \
652 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/w65.sc
${GEN_DEPENDS}
653 ${GENSCRIPTS} w65
"$(tdir_w65)"
654 ez8001.c
: $(srcdir)/emulparams
/z8001.sh \
655 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/z8000.sc
${GEN_DEPENDS}
656 ${GENSCRIPTS} z8001
"$(tdir_z8001)"
657 ez8002.c
: $(srcdir)/emulparams
/z8002.sh \
658 $(srcdir)/emultempl
/generic.em
$(srcdir)/scripttempl
/z8000.sc
${GEN_DEPENDS}
659 ${GENSCRIPTS} z8002
"$(tdir_z8002)"
661 $(LD_PROG
): $(OFILES
) $(BFDDEP
) $(LIBIBERTY
)
662 $(HLDENV
) $(CC
) $(HLDFLAGS
) $(CFLAGS
) $(LDFLAGS
) -o
$(LD_PROG
) $(OFILES
) $(BFDLIB
) $(LIBIBERTY
) $(EXTRALIBS
)
664 # The generated emulation files mostly have the same dependencies.
665 $(EMULATION_OFILES
): ..
/bfd
/bfd.h sysdep.h config.h
$(INCDIR
)/bfdlink.h \
666 ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
667 ldctor.h ldexp.h ldlang.h ldgram.h
669 # These targets are for the dejagnu testsuites. The file site.exp
670 # contains global variables that all the testsuites will use.
672 site.exp
: .
/config.status Makefile
673 @echo
"Making a new config file..."
676 @mv site.exp site.bak
677 @echo
"## variables are automatically generated by make ##" > .
/tmp0
678 @echo
"# Do not edit here. If you wish to override these" >> .
/tmp0
679 @echo
"# values, add them to the last section" >> .
/tmp0
680 @echo
"# HOST AND TARGET INFO" >> .
/tmp0
681 @echo
"set host_os @host_os@" >> .
/tmp0
682 @echo
"set host_alias @host_alias@" >> .
/tmp0
683 @echo
"set host_cpu @host_cpu@" >> .
/tmp0
684 @echo
"set host_vendor @host_vendor@" >> .
/tmp0
685 @echo
"set target_os @target_os@" >> .
/tmp0
686 @echo
"set target_alias @target_alias@" >> .
/tmp0
687 @echo
"set target_cpu @target_cpu@" >> .
/tmp0
688 @echo
"set target_vendor @target_vendor@" >> .
/tmp0
689 @echo
"set host_triplet @host@" >> .
/tmp0
690 @echo
"set target_triplet @target@" >> .
/tmp0
691 @echo
"# DIRECTORY INFO" >> .
/tmp0
692 @echo
"set objdir `pwd`" >> .
/tmp0
694 @echo
"# LD DEPENDENCIES" >> .
/tmp0
695 @echo
"set OFILES \"$(OFILES)\"" >> .
/tmp0
696 @echo
"set BFDLIB \"$(BFDLIB)\"" >> .
/tmp0
697 @echo
"set LIBIBERTY \"$(LIBIBERTY)\"" >> .
/tmp0
698 @echo
"set HOSTING_EMU \"$(HOSTING_EMU)\"" >> .
/tmp0
699 @echo
"set HOSTING_CRT0 \"$(HOSTING_CRT0)\"" >> .
/tmp0
700 @echo
"set HOSTING_LIBS \"$(HOSTING_LIBS)\"" >> .
/tmp0
702 @echo
"## Variables generated by configure. Do Not Edit ##" >> .
/tmp0
703 @cat .
/tmp0
> site.exp
704 @cat site.bak | sed \
705 -e
'1,/^## Variables generated by.*##/ d' >> site.exp
710 srcroot
=`cd ${srcdir}; pwd` ; export srcroot
; \
711 EXPECT
=${EXPECT} ; export EXPECT
; \
712 $(RPATH_ENVVAR
)=$$r/..
/bfd
:$$r/..
/opcodes
:$$$(RPATH_ENVVAR
); \
713 export $(RPATH_ENVVAR
); \
714 if
[ -f
$$r/..
/expect
/expect
] ; then \
715 TCL_LIBRARY
=$${srcroot}/..
/tcl
/library
; \
716 export TCL_LIBRARY
; \
718 $(RUNTEST
) --tool
ld --srcdir $(srcdir)/testsuite
$(RUNTESTFLAGS
) \
719 CC
="$(CC_FOR_TARGET)" CFLAGS
="$(CFLAGS)" \
720 CXX
="$(CXX_FOR_TARGET)" CXXFLAGS
="$(CXXFLAGS)" \
721 CC_FOR_HOST
="$(CC)" CFLAGS_FOR_HOST
="$(CFLAGS)"
724 .PHONY
: check installcheck
726 # Rules for testing by relinking ld itself.
727 # A similar test is in the testsuite. This target is for ease of use
731 .
/ld.new
$(HOSTING_EMU
) -o ld-partial.o
-r
$(OFILES
)
733 .
/ld.new
$(HOSTING_EMU
) -o ld1
$(HOSTING_CRT0
) ld-partial.o
$(BFDLIB
) $(LIBIBERTY
) $(HOSTING_LIBS
)
736 .
/ld.new
$(HOSTING_EMU
) -o ld1-full
$(HOSTING_CRT0
) $(OFILES
) $(BFDLIB
) $(LIBIBERTY
) $(HOSTING_LIBS
)
739 .
/ld1
$(HOSTING_EMU
) -o ld2
$(HOSTING_CRT0
) $(OFILES
) $(BFDLIB
) $(LIBIBERTY
) $(HOSTING_LIBS
)
742 .
/ld2
$(HOSTING_EMU
) -o ld3
$(HOSTING_CRT0
) $(OFILES
) $(BFDLIB
) $(LIBIBERTY
) $(HOSTING_LIBS
)
749 # A test program for C++ constructors and destructors.
750 # This test is now in the testsuite.
752 #cdtest: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
753 # ./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
754 # cdtest-main.o cdtest-bar.o cdtest-foo.o $(HOSTING_LIBS)
757 # ./cdtest > cdtest.tmp
758 # mv cdtest.tmp cdtest.out
760 #cdtest-ur.o: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
761 # ./ld.new $(HOSTING_EMU) -o cdtest-ur.o -Ur cdtest-main.o \
762 # cdtest-bar.o cdtest-foo.o
764 #cdtest-ur: cdtest-ur.o
765 # ./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.o \
768 #cdtest-ur.out: cdtest-ur
769 # ./cdtest-ur > cdtest-ur.tmp
770 # mv cdtest-ur.tmp cdtest-ur.out
772 #check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
773 # diff $(srcdir)/cdtest.exp cdtest.out
774 # diff $(srcdir)/cdtest.exp cdtest-ur.out
776 #.PHONY: check-cdtest
778 # END OF CHECK TARGETS
780 # DOCUMENTATION TARGETS
781 # Manual configuration file; not usually attached to normal configuration,
782 # because almost all configs use "gen" version of manual.
783 # Set DOCVER above to change.
784 configdoc.texi
: ${DOCVER}-doc.texi
785 ln
-s
${srcdir}/${DOCVER}-doc.texi .
/configdoc.texi || \
786 ln
${srcdir}/${DOCVER}-doc.texi .
/configdoc.texi || \
787 cp
${srcdir}/${DOCVER}-doc.texi .
/configdoc.texi
791 ld.
dvi: $(srcdir)/ld.texinfo configdoc.texi
$(BFDDIR
)/doc
/bfdsumm.texi
792 TEXINPUTS
=$(BFDDIR
)/doc
:$$TEXINPUTS $(TEXI2DVI
) $(srcdir)/ld.texinfo
794 ldint.
dvi: $(srcdir)/ldint.texinfo
795 $(TEXI2DVI
) $(srcdir)/ldint.texinfo
797 # info file for online browsing
798 ld.
info: $(srcdir)/ld.texinfo configdoc.texi
$(BFDDIR
)/doc
/bfdsumm.texi
799 $(MAKEINFO
) -I
$(BFDDIR
)/doc
-I
$(srcdir) -o
ld.
info $(srcdir)/ld.texinfo
801 ldint.
info: $(srcdir)/ldint.texinfo
802 $(MAKEINFO
) -o ldint.
info $(srcdir)/ldint.texinfo
806 #separate targets for "ms", "me", and "mm" forms of roff doc
807 # Try to use a recent texi2roff. v2 was put on prep in jan91.
808 # If you want an index, see texi2roff doc for postprocessing
809 # and add -i to texi2roff invocations below.
810 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
811 # correspondint -e lines when later texi2roff's are current)
812 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
813 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
814 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
815 # + @alphaenumerate is ridiculously new, turned into @enumerate
817 ld.ms
: $(srcdir)/ld.texinfo
818 sed
-e
'/\\input texinfo/d' \
819 -e
'/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
820 -e
'/^@ifinfo/,/^@end ifinfo/d' \
824 -e
's/^@alphaenumerate/@enumerate/g' \
825 -e
's/^@end alphaenumerate/@end enumerate/g' \
826 $(srcdir)/ld.texinfo | \
827 $(TEXI2ROFF
) $(TEXI2OPT
) -ms | \
828 sed
-e
's/---/\\(em/g' \
831 # index for roff output
833 $(ROFF
) -ms
ld.ms
2>&1 1>/dev
/null | \
834 sed
-e
'/: warning:/d' | \
835 texi2index
>ld-index.ms
838 ld.mm
: $(srcdir)/ld.texinfo
839 sed
-e
'/\\input texinfo/d' \
840 -e
'/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
841 -e
'/^@ifinfo/,/^@end ifinfo/d' \
846 -e
's/^@alphaenumerate/@enumerate/g' \
847 -e
's/^@end alphaenumerate/@end enumerate/g' \
848 $(srcdir)/ld.texinfo | \
849 $(TEXI2ROFF
) $(TEXI2OPT
) -mm | \
850 sed
-e
's/---/\\(em/g' \
853 # index for roff output
855 $(ROFF
) -mm
ld.mm
2>&1 1>/dev
/null | \
856 sed
-e
'/: warning:/d' | \
857 texi2index
>ld-index.mm
860 ld.me
: $(srcdir)/ld.texinfo
861 sed
-e
'/\\input texinfo/d' \
862 -e
'/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
863 -e
'/^@ifinfo/,/^@end ifinfo/d' \
867 -e
's/^@alphaenumerate/@enumerate/g' \
868 -e
's/^@end alphaenumerate/@end enumerate/g' \
869 $(srcdir)/ld.texinfo | \
870 $(TEXI2ROFF
) $(TEXI2OPT
) -me | \
871 sed
-e
's/---/\\(em/g' \
874 # index for roff output
876 $(ROFF
) -me
ld.me
2>&1 1>/dev
/null | \
877 sed
-e
'/: warning:/d' | \
878 texi2index
>ld-index.me
882 -mv
-f
$(STAGESTUFF
) $(LD_PROG
) stage1
883 -(cd stage1
; ln
-s
$(LD_PROG
) ld)
887 -mv
-f
$(STAGESTUFF
) $(LD_PROG
) stage2
888 -(cd stage2
; ln
-s
$(LD_PROG
) ld)
892 -mv
-f
$(STAGESTUFF
) $(LD_PROG
) stage3
893 -(cd stage3
; ln
-s
$(LD_PROG
) ld)
898 for i in
$(STAGESTUFF
) $(LD_PROG
) ; do cmp
$$i $(against
)/$$i ; done
901 -(cd stage1
; mv
-f
* ..
)
906 -(cd stage2
; mv
-f
* ..
)
911 -(cd stage3
; mv
-f
* ..
)
915 .PHONY
: stage1 stage2 stage3 comparison de-stage1 de-stage2 de-stage3
917 # Stuff that should be included in a distribution:
918 LDDISTSTUFF
= ldgram.c ldgram.h ldlex.c
919 diststuff
: $(LDDISTSTUFF
) info
922 -rm -f
$(STAGESTUFF
) ld.??
ld.??? ldlex.
[qp
]
923 -rm -f
ld ld1 ld2 ld3
*.o y.output cdtest cdtest.out cdtest.tmp
924 -rm -f cdtest-ur cdtest-ur.out cdtest-ur.tmp crtbegin.o crtend.o
930 -rm -f Makefile config.status TAGS site.exp site.bak config.cache
931 -rm -f config.h stamp-h config.log
933 maintainer-clean
realclean: clean distclean
934 @echo
"This command is intended for maintainers to use;"
935 @echo
"it deletes files that may require special tools to rebuild."
936 -rm -f
$(GENERATED_CFILES
) $(GENERATED_HFILES
)
937 -rm -f
$(LDDISTSTUFF
) *.
info* configdoc.texi
939 .PHONY
: diststuff
mostlyclean clean distclean realclean
941 lintlog
:$(LINTSOURCES
) Makefile
942 $(LINT
) -abhxzn
$(LINTFLAGS
) $(LINTSOURCES
) \
943 | grep
-v
"pointer casts may be troublesome" \
944 | grep
-v
"possible pointer alignment problem" \
946 | grep
-v
"conversion from long may lose accuracy" \
947 | grep
-v
"warning: constant argument to NOT" \
948 | grep
-v
"enumeration type clash, operator CAST" \
949 | grep
-v
"warning: constant in conditional context"\
950 | grep
-v
"archive\.c"
954 etags
-t
$(srcdir)/*.
[chly
] *.
[chly
]
958 $(INSTALL_XFORM
) ld.new
$(bindir)/ld
959 $(INSTALL_XFORM1
) $(srcdir)/ld.1 $(man1dir)/ld.1
960 for f in ldscripts
/*; do \
961 $(INSTALL_DATA
) $$f $(scriptdir
)/$$f ; \
963 test -d
$(tooldir
) || mkdir
$(tooldir
)
964 test -d
$(tooldir
)/bin || mkdir
$(tooldir
)/bin
965 -n
=`echo ld | sed '$(program_transform_name)'`; \
966 rm -f
$(tooldir
)/bin
/ld; \
967 ln
$(bindir)/$$n $(tooldir
)/bin
/ld >/dev
/null
2>/dev
/null \
968 ||
$(INSTALL_PROGRAM
) ld.new
$(tooldir
)/bin
/ld
970 install-info
: ld.
info
971 if
[ -r
ld.
info ]; then \
976 for i in
`cd $$dir ; echo ld.info*` ; do \
977 $(INSTALL_DATA
) $$dir/$$i $(infodir)/$$i ; \
983 .PHONY
: install install-info clean-info
985 # Targets to rebuild dependencies in this Makefile.
986 # Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
987 .dep
: dep.sed
$(CFILES
) $(HFILES
) $(GENERATED_CFILES
) $(GENERATED_HFILES
) config.h
989 $(MAKE
) DEP
=$(DEP
) .dep1
990 sed
-f dep.sed
<.dep1
>.dep
992 # This rule really wants a mkdep that runs "gcc -MM".
993 .dep1
: $(CFILES
) $(GENERATED_CFILES
)
995 echo
'# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
996 $(DEP
) -f .dep2
$(ALL_CFLAGS
) $?
997 $(srcdir)/..
/move-if-change .dep2 .dep1
999 dep.sed
: dep-in.sed config.status
1000 sed
<$(srcdir)/dep-in.sed
>dep.sed \
1001 -e
's!@INCDIR@!$(INCDIR)!' \
1002 -e
's!@SRCDIR@!$(srcdir)!'
1005 sed
-e
'/^..DO NOT DELETE THIS LINE/,$$d' < Makefile
> tmp-Makefile
1006 cat .dep
>> tmp-Makefile
1007 $(srcdir)/..
/move-if-change tmp-Makefile Makefile
1010 sed
-e
'/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in
> tmp-Makefile.in
1011 cat .dep
>> tmp-Makefile.in
1012 $(srcdir)/..
/move-if-change tmp-Makefile.in
$(srcdir)/Makefile.in
1016 # Dummy target to force execution of dependent targets.
1022 Makefile
: Makefile.in config.status
1023 CONFIG_FILES
=Makefile CONFIG_HEADERS
= $(SHELL
) .
/config.status
1025 config.h
: stamp-h
; @true
1026 stamp-h
: config.in config.status
1027 CONFIG_FILES
= CONFIG_HEADERS
=config.h
:config.in
$(SHELL
) .
/config.status
1029 config.status
: configure configure.host configure.tgt
1030 $(SHELL
) .
/config.status
--recheck
1032 # What appears below is generated by a hacked mkdep using gcc -MM.
1034 # DO NOT DELETE THIS LINE -- mkdep uses it.
1035 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
1037 ldctor.o
: ldctor.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1038 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1039 $(INCDIR
)/bfdlink.h
ld.h ldexp.h ldlang.h ldmisc.h \
1040 ldgram.h ldmain.h ldctor.h
1041 ldemul.o
: ldemul.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1042 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1043 ld.h ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h \
1045 ldexp.o
: ldexp.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1046 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1047 $(INCDIR
)/bfdlink.h
ld.h ldmain.h ldmisc.h ldexp.h \
1049 ldfile.o
: ldfile.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1050 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1051 $(INCDIR
)/bfdlink.h
ld.h ldmisc.h ldexp.h ldlang.h \
1052 ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h
1053 ldlang.o
: ldlang.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1054 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1055 $(INCDIR
)/libiberty.h
$(INCDIR
)/bfdlink.h
ld.h ldmain.h \
1056 ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h ldmisc.h \
1057 ldctor.h ldfile.h
$(INCDIR
)/fnmatch.h
1058 ldmain.o
: ldmain.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1059 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1060 $(INCDIR
)/libiberty.h
$(INCDIR
)/progress.h
$(INCDIR
)/bfdlink.h \
1061 ld.h ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
1062 ldemul.h ldlex.h ldfile.h ldctor.h
1063 ldmisc.o
: ldmisc.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1064 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1065 $(INCDIR
)/libiberty.h
$(INCDIR
)/demangle.h
ld.h ldmisc.h \
1066 ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h
1067 ldver.o
: ldver.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1068 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1069 ld.h ldver.h ldemul.h ldmain.h
1070 ldwrite.o
: ldwrite.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1071 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1072 $(INCDIR
)/bfdlink.h
$(INCDIR
)/libiberty.h
ld.h ldexp.h \
1073 ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h
1074 lexsup.o
: lexsup.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1075 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1076 $(INCDIR
)/libiberty.h
$(INCDIR
)/getopt.h
$(INCDIR
)/bfdlink.h \
1077 ld.h ldmain.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h \
1078 ldfile.h ldver.h ldemul.h
1079 mri.o
: mri.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h
$(INCDIR
)/obstack.h \
1080 sysdep.h config.h
$(INCDIR
)/fopen-same.h
ld.h ldexp.h \
1081 ldlang.h ldmisc.h mri.h ldgram.h
1082 ldcref.o
: ldcref.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1083 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1084 $(INCDIR
)/bfdlink.h
$(INCDIR
)/libiberty.h
ld.h ldmain.h \
1085 ldmisc.h ldexp.h ldlang.h
1086 ldgram.o
: ldgram.c ..
/bfd
/bfd.h
$(INCDIR
)/ansidecl.h \
1087 $(INCDIR
)/obstack.h sysdep.h config.h
$(INCDIR
)/fopen-same.h \
1088 $(INCDIR
)/bfdlink.h
ld.h ldexp.h ldver.h ldlang.h ldemul.h \
1089 ldfile.h ldmisc.h ldmain.h mri.h ldlex.h
1090 ldlex.o
: ldlex.c ..
/bfd
/bfd.h
$(INCDIR
)/obstack.h sysdep.h \
1091 config.h
$(INCDIR
)/fopen-same.h
ld.h ldgram.h ldmisc.h \
1092 ldexp.h ldlang.h ldfile.h ldlex.h ldmain.h
1094 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY