# Makefile for the GNU linker ld (version 2)
-# Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1996
+# Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1997
# Free Software Foundation, Inc.
# This file is part of GNU ld.
SHELL = /bin/sh
-INSTALL = `cd $(srcdir); pwd`/../install.sh -c
+INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
-INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
AR = ar
AR_FLAGS = qv
#.cc.o:
# $(CXX) -c -I$(srcdir) $(CXXFLAGS) $(CFLAGS) $<
-ALL_CFLAGS = $(INCLUDES) @HDEFINES@ $(CFLAGS)
+ALL_CFLAGS = -D_GNU_SOURCE $(INCLUDES) @HDEFINES@ $(CFLAGS)
.c.o:
$(CC) -c $(ALL_CFLAGS) $<
eelf32lmip.o \
eelf32lppc.o \
eelf32ppc.o \
- eelf64alpha.o \
eelf64_sparc.o \
eelf_i386.o \
egld960.o \
emipsidt.o \
emipsidtl.o \
emipslit.o \
+ emipslnews.o \
enews.o \
ens32knbsd.o \
epc532macha.o \
eshlelf.o \
eshl.o \
esparcaout.o \
+ esparclinux.o \
esparclynx.o \
esparcnbsd.o \
est2000.o \
ez8001.o \
ez8002.o
+ALL_64_EMULATIONS = \
+ eelf64alpha.o
+
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
- mri.c ldcref.c fnmatch.c
+ mri.c ldcref.c
HFILES = config.h ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
- ldwrite.h mri.h fnmatch.h
+ ldwrite.h mri.h
GENERATED_CFILES = ldgram.c ldlex.c
GENERATED_HFILES = ldgram.h ldemul-list.h
OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
- ldfile.o ldcref.o fnmatch.o ${EMULATION_OFILES}
+ ldfile.o ldcref.o ${EMULATION_OFILES}
LINTSOURCES = $(CFILES) $(GENERATED_CFILES) e*.c
ldgram.h: ldgram.c
ldmain.o: ldmain.c config.status
- $(CC) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' $(ALL_CFLAGS) $<
+ $(CC) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(ALL_CFLAGS) $<
ldemul-list.h: Makefile
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
mv ldemul-tmp.h ldemul-list.h
ldlex.c: ldlex.l
- $(LEX) -I -Cem $(srcdir)/ldlex.l
+ $(LEX) $(srcdir)/ldlex.l
-sed -e '/^int.*free();/d' \
-e '/^char.*malloc();/d' \
-e 's/malloc/xmalloc/g' \
ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
-# start-sanitize-d10v
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d10velf "$(tdir_d10v)"
-# end-sanitize-d10v
+# start-sanitize-d30v
+ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} d30velf "$(tdir_d30v)"
+# end-sanitize-d30v
edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)"
eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
-# start-sanitize-m32r
em32relf.c: $(srcdir)/emulparams/m32relf.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf "$(tdir_m32r)"
-# end-sanitize-m32r
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
- $(srcdir)/emultempl/m88kbcs.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
emipslit.c: $(srcdir)/emulparams/mipslit.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipslit "$(tdir_mipslit)"
+emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipslnews
+emn10300.c: $(srcdir)/emulparams/mn10300.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
+emn10200.c: $(srcdir)/emulparams/mn10200.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
enews.c: $(srcdir)/emulparams/news.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} news "$(tdir_news)"
esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
+esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
+ $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
esun4.c: $(srcdir)/emulparams/sun4.sh \
$(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sun4 "$(tdir_sun4)"
+# start-sanitize-tic80
+etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
+# end-sanitize-tic80
evanilla.c: $(srcdir)/emulparams/vanilla.sh \
$(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
${GENSCRIPTS} vanilla "$(tdir_vanilla)"
${GENSCRIPTS} vsta "$(tdir_vsta)"
# start-sanitize-v850
ev850.c: $(srcdir)/emulparams/v850.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
${GENSCRIPTS} v850 "$(tdir_v850)"
# end-sanitize-v850
ew65.c: $(srcdir)/emulparams/w65.sh \
# TeX output
dvi: ld.dvi
ld.dvi: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
- TEXINPUTS=$(BFDDIR)/doc:$$TEXINPUTS $(TEXI2DVI) $(srcdir)/ld.texinfo
+ TEXINPUTS=$(BFDDIR)/doc:$$TEXINPUTS MAKEINFO='$(MAKEINFO) -I$(BFDDIR)/doc -I$(srcdir)' \
+ $(TEXI2DVI) $(srcdir)/ld.texinfo
ldint.dvi: $(srcdir)/ldint.texinfo
$(TEXI2DVI) $(srcdir)/ldint.texinfo
# info file for online browsing
ld.info: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
- $(MAKEINFO) -I$(BFDDIR)/doc -o ld.info $(srcdir)/ld.texinfo
+ $(MAKEINFO) -I$(BFDDIR)/doc -I$(srcdir) -o ld.info $(srcdir)/ld.texinfo
ldint.info: $(srcdir)/ldint.texinfo
$(MAKEINFO) -o ldint.info $(srcdir)/ldint.texinfo
-rm -f ldemul-list.h
-rm -fr tmpdir
clean: mostlyclean
- -rm -f $(LD_PROG) configdoc.texi
+ -rm -f $(LD_PROG)
distclean: clean
-rm -f Makefile config.status TAGS site.exp site.bak config.cache
-rm -f config.h stamp-h config.log
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-rm -f $(GENERATED_CFILES) $(GENERATED_HFILES)
- -rm -f $(LDDISTSTUFF) *.info*
+ -rm -f $(LDDISTSTUFF) *.info* configdoc.texi
.PHONY: diststuff mostlyclean clean distclean realclean
etags -t $(srcdir)/*.[chly] *.[chly]
-install:
- $(INSTALL_XFORM) ld.new $(bindir)/ld
- $(INSTALL_XFORM1) $(srcdir)/ld.1 $(man1dir)/ld.1
+install: ld.new installdirs
+ n=`echo ld | sed '$(program_transform_name)'`; \
+ $(INSTALL_PROGRAM) ld.new $(bindir)/$$n; \
+ $(INSTALL_DATA) $(srcdir)/ld.1 $(man1dir)/$$n.1; \
+ rm -f $(tooldir)/bin/ld; \
+ ln $(bindir)/$$n $(tooldir)/bin/ld >/dev/null 2>/dev/null \
+ || $(INSTALL_PROGRAM) ld.new $(tooldir)/bin/ld
for f in ldscripts/*; do \
$(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
done
- test -d $(tooldir) || mkdir $(tooldir)
- test -d $(tooldir)/bin || mkdir $(tooldir)/bin
- -n=`echo ld | sed '$(program_transform_name)'`; \
- rm -f $(tooldir)/bin/ld; \
- ln $(bindir)/$$n $(tooldir)/bin/ld >/dev/null 2>/dev/null \
- || $(INSTALL_PROGRAM) ld.new $(tooldir)/bin/ld
+
+installdirs:
+ $(SHELL) $(srcdir)/../mkinstalldirs $(bindir) $(man1dir) $(scriptdir)/ldscripts $(tooldir)/bin
install-info: ld.info
+ $(SHELL) $(srcdir)/../mkinstalldirs $(infodir)
if [ -r ld.info ]; then \
dir=. ; \
else \
clean-info:
-rm -rf *.info*
-.PHONY: install install-info clean-info
+.PHONY: install installdirs install-info clean-info
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h ld.h ldexp.h ldlang.h ldmisc.h \
- ldgram.h ldmain.h ldctor.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ ld.h ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h \
- ldemul-list.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldemul.h \
+ ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldemul-list.h
ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h ld.h ldmain.h ldmisc.h ldexp.h \
- ldgram.h ldlang.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ ld.h ldmain.h ldmisc.h ldexp.h ldgram.h ldlang.h
ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h ld.h ldmisc.h ldexp.h ldlang.h \
- ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ ld.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
+ ldlex.h ldemul.h
ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h ldmisc.h \
- ldctor.h ldfile.h fnmatch.h
+ ldctor.h ldfile.h $(INCDIR)/fnmatch.h
ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/progress.h $(INCDIR)/bfdlink.h \
- ld.h ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
- ldemul.h ldlex.h ldfile.h ldctor.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h ldemul.h \
+ ldlex.h ldfile.h ldctor.h
ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/demangle.h ld.h ldmisc.h \
- ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/demangle.h ld.h ldmisc.h ldexp.h ldlang.h \
+ ldgram.h ldlex.h ldmain.h ldfile.h
ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h ldver.h ldemul.h ldmain.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldver.h \
+ ldemul.h ldmain.h
ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h ldexp.h \
- ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/libiberty.h ld.h ldexp.h ldlang.h ldwrite.h \
+ ldmisc.h ldgram.h ldmain.h
lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h \
- ld.h ldmain.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h \
- ldfile.h ldver.h ldemul.h
-mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldexp.h \
- ldlang.h ldmisc.h mri.h ldgram.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
+ ldver.h ldemul.h
+mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \
+ config.h $(INCDIR)/fopen-same.h ld.h ldexp.h ldlang.h \
+ ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h ldmain.h \
- ldmisc.h ldexp.h ldlang.h
-fnmatch.o: fnmatch.c
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/libiberty.h ld.h ldmain.h ldmisc.h ldexp.h \
+ ldlang.h
ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h ld.h ldexp.h ldver.h ldlang.h ldemul.h \
- ldfile.h ldmisc.h ldmain.h mri.h ldlex.h
-ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/obstack.h sysdep.h \
- config.h $(INCDIR)/fopen-same.h ld.h ldgram.h ldmisc.h \
- ldexp.h ldlang.h ldfile.h ldlex.h ldmain.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ ld.h ldexp.h ldver.h ldlang.h ldemul.h ldfile.h ldmisc.h \
+ ldmain.h mri.h ldlex.h
+ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ld.h ldgram.h ldmisc.h ldexp.h ldlang.h ldfile.h ldlex.h \
+ ldmain.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY