summaryrefslogtreecommitdiff
path: root/bfd/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/Makefile.am')
-rw-r--r--bfd/Makefile.am49
1 files changed, 21 insertions, 28 deletions
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index f83fcf46039..b8537dba4a9 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = cygnus
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
-MKDEP = mkdep
+MKDEP = gcc -MM
SUBDIRS = doc po
@@ -546,22 +546,15 @@ install-data-local: $(BFD_H)
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) bfd.h
rm -f DEP1
- $(MAKE) MKDEP=$(MKDEP) DEP1
- sed -f dep.sed <DEP1 >DEP
-
-# This rule really wants a mkdep that runs "gcc -MM".
-# The NetBSD mkdep overwrites any existing file contents, and doesn't insert
-# the "DO NOT DELETE" line.
-# Other mkdep versions require a file that already exists, and do insert it.
-# Hence the weirdness....
+ $(MAKE) MKDEP="$(MKDEP)" DEP1
+ sed -f dep.sed < DEP1 > $@
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@
+
DEP1: $(CFILES)
- rm -f DEP2 DEP2a
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
- echo > DEP2a
- $(MKDEP) -f DEP2a $(INCLUDES) $(CFLAGS) $?
- sed -e '/DO NOT DELETE/d' -e '/^$$/d' < DEP2a >> DEP2
- rm -f DEP2a
- $(SHELL) $(srcdir)/../move-if-change DEP2 DEP1
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
+ mv -f DEP2 $@
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
@@ -644,7 +637,7 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES)
MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \
targmatch.h
-CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEP1 libbfd.a stamp-lib \
+CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
# We want to rerun configure if config.bfd or configure.host change.
@@ -656,7 +649,6 @@ elfarm-oabi.lo: elfarm-oabi.c elf32-arm.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-# What appears below is generated by a hacked mkdep using gcc -MM.
elfarm-nabi.lo: elfarm-nabi.c elf32-arm.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
@@ -704,6 +696,7 @@ cpu-fr30.lo: cpu-fr30.c
cpu-h8300.lo: cpu-h8300.c
cpu-h8500.lo: cpu-h8500.c
cpu-hppa.lo: cpu-hppa.c
+cpu-i370.lo: cpu-i370.c
cpu-i386.lo: cpu-i386.c
cpu-i860.lo: cpu-i860.c
cpu-i960.lo: cpu-i960.c
@@ -871,9 +864,9 @@ elf32-fr30.lo: elf32-fr30.c elf-bfd.h $(INCDIR)/elf/common.h \
elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-target.h
-elf32-i370.lo: elf32-i370.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-target.h
+elf32-i370.lo: elf32-i370.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/i370.h elf32-target.h
elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
@@ -1027,12 +1020,6 @@ pe-i386.lo: pe-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
pei-i386.lo: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pe-mips.lo: pe-mips.c $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h
-pei-mips.lo: pei-mips.c pe-mips.c $(INCDIR)/coff/mipspe.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h
pe-mcore.lo: pe-mcore.c coff-mcore.c $(INCDIR)/coff/mcore.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
@@ -1047,10 +1034,16 @@ pei-ppc.lo: pei-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-sh.lo: pe-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- coffcode.h peicode.h
+ coffcode.h peicode.h libpei.h
pei-sh.lo: pei-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- coffcode.h peicode.h
+ coffcode.h peicode.h libpei.h
+pe-mips.lo: pe-mips.c $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+pei-mips.lo: pei-mips.c pe-mips.c $(INCDIR)/coff/mipspe.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
peigen.lo: peigen.c $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
ppcboot.lo: ppcboot.c