# which may have the form: LIB_PATH=/lib:/usr/local/lib
LIB_PATH =
+# Additional libraries which are used when ld is built native. This
+# is set by some host makefile fragments.
+NATIVE_LIB_DIRS =
+
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
DOCVER = gen
# Where to find texinfo.tex to format docn with TeX
-TEXIDIR = $(srcdir)/../texinfo/fsf
+TEXIDIR = $(srcdir)/../texinfo
# Where to find other docs needed to format with TeX
TEXINPUTS = $(TEXIDIR):$(BFDDIR)/doc:$(srcdir)
else echo gcc; \
fi`
# FIX_ME: using ../gcc/xgcc breaks the cdtest.
-RUNTEST_CXX = CXX
+RUNTEST_CXX = $(CXX)
RUNTEST_CXXFLAGS = $(CXXFLAGS)
all:
em_m68kcoff.o em_st2000.o em_sa29200.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_hppaosf.o em_mipsidtl.o em_sh.o em_elf_i386.o em_alpha.o \
$(OTHER_EMULATIONS)
# This is now set by configure.in.
# These all start with em_ so 'make clean' can find them.
-GENSCRIPTS=sh $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${host_alias} ${target_alias} ${EMUL}
+GENSCRIPTS=$(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${host_alias} ${target_alias} ${EMUL} "$(NATIVE_LIB_DIRS)"
GEN_DEPENDS=$(srcdir)/genscripts.sh
em_sun4.c: $(srcdir)/emulparams/sun4.sh \
em_m68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kcoff
+em_m68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68klynx
em_i386coff.c: $(srcdir)/emulparams/i386coff.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386coff
+em_i386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386lynx
em_mipslit.c: $(srcdir)/emulparams/mipslit.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipslit
em_mipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipsidtl
+em_elf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386
+em_elf32mipb.c: $(srcdir)/emulparams/elf32mipb.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mipb
+em_alpha.c: $(srcdir)/emulparams/alpha.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} alpha
$(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY)
- $(CC) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(LOADLIBES)
+ $(CC) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(CFLAGS) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(LOADLIBES)
+
+# The generated emulation files mostly have the same dependencies.
+$(EMULATION_OFILES): ../bfd/bfd.h ../bfd/sysdep.h ld.h ldemul.h \
+ ldfile.h ldmisc.h config.h
# This list of dependencies was generated by doing a make with gcc -MM
# saving the output in a file and removing the gcc commands