Add ability for individual targets to have their own command line switches by
[deliverable/binutils-gdb.git] / ld / Makefile.am
index 6113e8d58c280f39e2c57678ca8fc99078998675..3016a79e0112b6adeefaf84ac831af589cdc0bbb 100644 (file)
@@ -9,9 +9,9 @@ SUBDIRS = po
 
 tooldir = $(exec_prefix)/$(target_alias)
 
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L$(srcdir)/../bison/ ; else echo bison -y ; fi`
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
 YFLAGS = -d
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
 
 # We put the scripts in the directory $(scriptdir)/ldscripts.
 # We can't put the scripts in $(datadir) because the SEARCH_DIR
@@ -33,7 +33,7 @@ LIB_PATH =
 BASEDIR = $(srcdir)/..
 BFDDIR = $(BASEDIR)/bfd
 INCDIR = $(BASEDIR)/include
-DEP = mkdep
+MKDEP = mkdep
 
 # What version of the manual to build
 DOCVER = gen
@@ -134,7 +134,6 @@ ALL_EMULATIONS = \
        egld960coff.o \
        eelf32fr30.o \
        eelf32mcore.o \
-       ego32.o \
        eh8300.o \
        eh8300h.o \
        eh8300s.o \
@@ -159,6 +158,7 @@ ALL_EMULATIONS = \
        ei386nbsd.o \
        ei386nw.o \
        ei386pe.o \
+       ei386pe_posix.o \
        elnk960.o \
        em68k4knbsd.o \
        em68kaout.o \
@@ -260,10 +260,13 @@ ldemul-list.h: Makefile
        echo "  0") >ldemul-tmp.h
        mv ldemul-tmp.h ldemul-list.h
 
+stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
+         cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
+
 # These all start with e so 'make clean' can find them.
 
 GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
-GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
+GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
 @TDIRS@
 
 ea29k.c: $(srcdir)/emulparams/a29k.sh \
@@ -398,9 +401,6 @@ egld960.c: $(srcdir)/emulparams/gld960.sh \
 egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
   $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
-ego32.c: $(srcdir)/emulparams/go32.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
-       ${GENSCRIPTS} go32 "$(tdir_go32)"
 eh8300.c: $(srcdir)/emulparams/h8300.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} h8300 "$(tdir_h8300)"
@@ -473,6 +473,9 @@ ei386nw.c:  $(srcdir)/emulparams/i386nw.sh \
 ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
   $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} i386pe "$(tdir_i386pe)"
+ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
+  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
 elnk960.c: $(srcdir)/emulparams/lnk960.sh \
   $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
@@ -739,7 +742,7 @@ MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
        ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
 mostlyclean-local:
        -rm -rf tmpdir
-CLEANFILES = dep.sed .dep .dep1
+CLEANFILES = dep.sed DEP DEP1
 
 .PHONY: install-exec-local install-data-local
 
@@ -774,37 +777,37 @@ distclean-local:
        rm -rf ldscripts
 
 # Targets to rebuild dependencies in this Makefile.
-# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
-.dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
-       rm -f .dep1
-       $(MAKE) DEP=$(DEP) .dep1
-       sed -f dep.sed <.dep1 >.dep
+# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
+DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
+       rm -f DEP1
+       $(MAKE) MKDEP=$(MKDEP) DEP1
+       sed -f dep.sed <DEP1 >DEP
 
 # This rule really wants a mkdep that runs "gcc -MM".
-.dep1: $(CFILES) $(GENERATED_CFILES)
-       rm -f .dep2
-       echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
-       $(DEP) -f .dep2 $(INCLUDES) $?
-       $(srcdir)/../move-if-change .dep2 .dep1
+DEP1: $(CFILES) $(GENERATED_CFILES)
+       rm -f DEP2
+       echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
+       $(MKDEP) -f DEP2 $(INCLUDES) $?
+       $(srcdir)/../move-if-change DEP2 DEP1
 
 dep.sed: dep-in.sed config.status
        sed <$(srcdir)/dep-in.sed >dep.sed      \
                -e 's!@INCDIR@!$(INCDIR)!'      \
                -e 's!@SRCDIR@!$(srcdir)!'
 
-dep: .dep
+dep: DEP
        sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
-       cat .dep >> tmp-Makefile
+       cat DEP >> tmp-Makefile
        $(srcdir)/../move-if-change tmp-Makefile Makefile
 
-dep-in: .dep
+dep-in: DEP
        sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
-       cat .dep >> tmp-Makefile.in
+       cat DEP >> tmp-Makefile.in
        $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
 
-dep-am: .dep
+dep-am: DEP
        sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
-       cat .dep >> tmp-Makefile.am
+       cat DEP >> tmp-Makefile.am
        $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
 
 .PHONY: dep dep-in dep-am
@@ -831,7 +834,7 @@ ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.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 $(INCDIR)/fnmatch.h
+  ldctor.h ldfile.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
 ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
   $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
This page took 0.025977 seconds and 4 git commands to generate.