# Makefile for the GNU linker ld (version 2)
# Copyright (C) 1989, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
-# This file is part of GNU ld..
+# This file is part of GNU ld.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
em_m68kcoff.o em_st2000.o em_sa29200.o em_i386mach.o \
em_vanilla.o em_i386coff.o em_z8ksim.o em_mipslit.o em_i386bsd.o \
em_mipsbig.o em_mipsbsd.o em_mipsidt.o em_vax.o em_h8500.o \
- em_hppaosf.o em_mipsidtl.o em_sh.o em_elf_i386.o em_alpha.o \
+ em_h8500b.o em_h8500s.o em_h8500c.o em_h8500m.o \
+ em_hppaelf.o em_mipsidtl.o em_sh.o em_elf_i386.o em_alpha.o \
em_i386lynx.o em_m68klynx.o em_sparclynx.o em_coff_sparc.o \
- em_delta68.o \
+ em_delta68.o em_elf32ppc.o \
$(OTHER_EMULATIONS)
# This is now set by configure.in.
$(LEX) -I -Cem $(srcdir)/ldlex.l
-sed -e '/^int.*free();/d' \
-e '/^char.*malloc();/d' \
- -e 's/malloc/ldmalloc/g' \
+ -e 's/malloc/xmalloc/g' \
< lex.yy.c > ldlex.c.new
-rm lex.yy.c
mv ldlex.c.new ./ldlex.c
em_hp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} hp3hpux
-em_hppaosf.c: $(srcdir)/emulparams/hppaosf.sh \
- $(srcdir)/emultempl/hppaosf.em $(srcdir)/scripttempl/hppaosf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppaosf
+em_hppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
+ $(srcdir)/emultempl/hppaelf.em $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} hppaelf
em_i386aout.c: $(srcdir)/emulparams/i386aout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386aout
em_h8500.c: $(srcdir)/emulparams/h8500.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8500
+em_h8500b.c: $(srcdir)/emulparams/h8500b.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8500b
+em_h8500c.c: $(srcdir)/emulparams/h8500c.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8500c
+em_h8500m.c: $(srcdir)/emulparams/h8500m.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8500m
+em_h8500s.c: $(srcdir)/emulparams/h8500s.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8500s
em_sh.c: $(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} sh
em_coff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_sparc
+em_elf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
+ $(srcdir)/emultempl/ppc.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ppc
$(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(EXTRALIBS)
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h ../bfd/sysdep.h $(INCDIR)/bfdlink.h \
- ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h config.h ldctor.h
+ ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h config.h \
+ ldctor.h ldexp.h ldlang.h
# These targets are for the dejagnu testsuites. The file site.exp
# contains global variables that all the testsuites will use.
-@rm -f ./tmp?
check: ld.new site.exp
- $(RUNTEST) --tool ld \
- --srcdir $(srcdir)/testsuite $(RUNTESTFLAGS) \
- CC="$(RUNTEST_CC)" CFLAGS="$(RUNTEST_CFLAGS)" \
- CXX="$(RUNTEST_CXX)" CXXFLAGS="$(RUNTEST_CXXFLAGS)"
+ @if [ $(host_canonical) = $(target_canonical) ]; then \
+ $(RUNTEST) --tool ld \
+ --srcdir $(srcdir)/testsuite $(RUNTESTFLAGS) \
+ CC="$(RUNTEST_CC)" CFLAGS="$(RUNTEST_CFLAGS)" \
+ CXX="$(RUNTEST_CXX)" CXXFLAGS="$(RUNTEST_CXXFLAGS)" ;\
+ if [ $$? != 0 ]; then exit 1; else true; fi ;\
+ else \
+ echo No cross-linker tests yet. ;\
+ fi
installcheck:
.PHONY: check installcheck
# TeX output
dvi: ld.dvi
-ld.dvi: $(srcdir)/ld.texinfo $(srcdir)/configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
+ld.dvi: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
TEXINPUTS=$(BFDDIR)/doc:$$TEXINPUTS $(TEXI2DVI) $(srcdir)/ld.texinfo
ldint.dvi: $(srcdir)/ldint.texinfo
ln $(bindir)/$$n $(tooldir)/bin/ld \
|| $(INSTALL_PROGRAM) ld.new $(tooldir)/bin/ld
-install-info:
- for i in ld.info* ; do \
+install-info: ld.info
+ for i in $<* ; do \
$(INSTALL_DATA) $$i $(infodir)/$$i ; \
done
ldgram.h ldlang.h
ldfile.o : ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
- ld.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldlex.h
+ ld.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
+ ldlex.h
ldlang.o : ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h ld.h ldmain.h ldgram.h ldexp.h \
- ldlang.h ldemul.h ldlex.h ldmisc.h ldctor.h ldfile.h
+ $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h ldmisc.h \
+ ldctor.h ldfile.h
ldmain.o : ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.h config.h ld.h ldmain.h ldmisc.h \
- ldwrite.h ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h \
- ldfile.h ldctor.h
+ $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h config.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 ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
- ld.h ldmisc.h ldexp.h ldlang.h ldlex.h ldmain.h ldfile.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 ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
ld.h ldver.h ldemul.h ldmain.h
ldmisc.h ldgram.h ldmain.h
lexsup.o : lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
- ldlex.h ld.h ldexp.h ldgram.h ldmisc.h
+ $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h config.h ld.h \
+ ldmain.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h \
+ ldfile.h ldver.h
mri.o : mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h \
../bfd/sysdep.h $(INCDIR)/fopen-same.h ld.h ldexp.h \
ldlang.h ldmisc.h mri.h ldgram.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 \
- ld.h ldgram.h ldmisc.h ldexp.h ldlang.h ldfile.h ldlex.h
+ ../bfd/sysdep.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