READELF_PROG=readelf
+ELFEDIT_PROG=elfedit
+
# These should all be the same program too.
SIZE_PROG=size
NM_PROG=nm-new
SRCONV_PROG=srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
-bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ @BUILD_WINDMC@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_INSTALL_MISC@
+bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ @BUILD_WINDMC@ $(ADDR2LINE_PROG) $(READELF_PROG) $(ELFEDIT_PROG) @BUILD_DLLWRAP@
+
+bin_SCRIPTS = @BUILD_INSTALL_MISC@
+EXTRA_SCRIPTS = embedspu
## We need a special rule to install the programs which are built with
## -new, and to rename cxxfilt to c++filt.
HFILES = \
arsup.h binemul.h bucomm.h budbg.h \
- coffgrok.h debug.h dlltool.h dwarf.h nlmconv.h \
- sysdep.h unwind-ia64.h windres.h winduni.h windint.h \
+ coffgrok.h debug.h dlltool.h dwarf.h elfcomm.h nlmconv.h \
+ objdump.h sysdep.h unwind-ia64.h windres.h winduni.h windint.h \
windmc.h
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h mcparse.h
addr2line.c ar.c arsup.c bin2c.c binemul.c bucomm.c \
coffdump.c coffgrok.c cxxfilt.c \
dwarf.c debug.c dlltool.c dllwrap.c \
- emul_aix.c emul_vanilla.c filemode.c \
+ elfcomm.c emul_aix.c emul_vanilla.c filemode.c \
ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \
nlmconv.c nm.c not-ranlib.c not-strip.c \
objcopy.c objdump.c prdbg.c \
+ od-xcoff.c \
rclex.c rdcoff.c rddbg.c readelf.c rename.c \
resbin.c rescoff.c resrc.c resres.c \
size.c srconv.c stabs.c strings.c sysdump.c \
- unwind-ia64.c version.c \
+ unwind-ia64.c elfedit.c version.c \
windres.c winduni.c wrstabs.c \
windmc.c mclex.c
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
+# Extra object files for objdump
+OBJDUMP_PRIVATE_OFILES = @OBJDUMP_PRIVATE_OFILES@
+
# Code shared by all the binutils.
BULIBS = bucomm.c version.c filemode.c
+# Code shared by the ELF related programs.
+ELFLIBS = elfcomm.c
+
BFDLIB = ../bfd/libbfd.la
OPCODES = ../opcodes/libopcodes.la
# which depends on libintl, since we don't know whether LIBINTL_DEP will be
# non-empty until configure time. Ugh!
size_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
-objdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) $(OPCODES)
+objdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) $(OPCODES) $(OBJDUMP_PRIVATE_OFILES)
nm_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
ar_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
strings_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
windmc_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
addr2line_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
readelf_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
+elfedit_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
dllwrap_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
LDADD = $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
strings_SOURCES = strings.c $(BULIBS)
-readelf_SOURCES = readelf.c version.c unwind-ia64.c dwarf.c
+readelf_SOURCES = readelf.c version.c unwind-ia64.c dwarf.c $(ELFLIBS)
readelf_LDADD = $(LIBINTL) $(LIBIBERTY)
+elfedit_SOURCES = elfedit.c version.c $(ELFLIBS)
+elfedit_LDADD = $(LIBINTL) $(LIBIBERTY)
+
strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
nm_new_SOURCES = nm.c $(BULIBS)
-objdump_SOURCES = objdump.c dwarf.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
-objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
+objdump_SOURCES = objdump.c dwarf.c prdbg.c $(DEBUG_SRCS) $(BULIBS) $(ELFLIBS)
+EXTRA_objdump_SOURCES = od-xcoff.c
+objdump_LDADD = $(OBJDUMP_PRIVATE_OFILES) $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
-objdump.o:objdump.c
+objdump.@OBJEXT@:objdump.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(OBJDUMP_DEFS) $(srcdir)/objdump.c
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
sysroff.h: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h
-sysinfo$(EXEEXT_FOR_BUILD): sysinfo.o syslex.o
- $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.o syslex.o
+sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJEXT@ syslex.@OBJEXT@
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.@OBJEXT@ syslex.@OBJEXT@
-syslex.o: syslex.c sysinfo.h config.h
+syslex.@OBJEXT@: syslex.c sysinfo.h config.h
if [ -r syslex.c ]; then \
- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) syslex.c -Wno-error ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) syslex.c ; \
else \
- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/syslex.c -Wno-error ;\
+ $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex.c ;\
fi
-sysinfo.o: sysinfo.c
+sysinfo.@OBJEXT@: sysinfo.c
if [ -r sysinfo.c ]; then \
- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) sysinfo.c -Wno-error ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
else \
- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/sysinfo.c -Wno-error ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
fi
-bin2c$(EXEEXT_FOR_BUILD):
- $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c $(srcdir)/version.c
+bin2c$(EXEEXT_FOR_BUILD): bin2c.c
+ $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
-embedspu: embedspu.sh
- sed "s@^program_transform_name=@program_transform_name=$(program_transform_name)@" < $< > $@
+embedspu: embedspu.sh Makefile
+ sed "/^program_transform_name=/cprogram_transform_name=$(program_transform_name)" < $< > $@
chmod a+x $@
# We need these for parallel make.
# Disable -Werror, if it has been enabled, since old versions of bison/
# yacc will produce working code which contain compile time warnings.
-arparse.o: arparse.c
+arparse.@OBJEXT@: arparse.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f arparse.c || echo $(srcdir)/`arparse.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c `test -f arparse.c || echo $(srcdir)/`arparse.c $(NO_WERROR)
endif
-arlex.o: arlex.c
+arlex.@OBJEXT@: arlex.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f arlex.c || echo $(srcdir)/`arlex.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c `test -f arlex.c || echo $(srcdir)/`arlex.c $(NO_WERROR)
endif
-sysroff.o: sysroff.c
+sysroff.@OBJEXT@: sysroff.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f sysroff.c || echo $(srcdir)/`sysroff.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c `test -f sysroff.c || echo $(srcdir)/`sysroff.c $(NO_WERROR)
endif
-defparse.o: defparse.c
+defparse.@OBJEXT@: defparse.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f defparse.c || echo $(srcdir)/`defparse.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c `test -f defparse.c || echo $(srcdir)/`defparse.c $(NO_WERROR)
endif
-deflex.o: deflex.c
+deflex.@OBJEXT@: deflex.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f deflex.c || echo $(srcdir)/`deflex.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c `test -f deflex.c || echo $(srcdir)/`deflex.c $(NO_WERROR)
endif
-nlmheader.o: nlmheader.c
+nlmheader.@OBJEXT@: nlmheader.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f nlmheader.c || echo $(srcdir)/`nlmheader.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c `test -f nlmheader.c || echo $(srcdir)/`nlmheader.c $(NO_WERROR)
endif
-rcparse.o: rcparse.c
+rcparse.@OBJEXT@: rcparse.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f rcparse.c || echo $(srcdir)/`rcparse.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c `test -f rcparse.c || echo $(srcdir)/`rcparse.c $(NO_WERROR)
endif
-mcparse.o: mcparse.c
+mcparse.@OBJEXT@: mcparse.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f mcparse.c || echo $(srcdir)/`mcparse.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c `test -f mcparse.c || echo $(srcdir)/`mcparse.c $(NO_WERROR)
endif
-rclex.o: rclex.c
+rclex.@OBJEXT@: rclex.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/rclex.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c $(srcdir)/rclex.c $(NO_WERROR)
endif
-mclex.o: mclex.c
+mclex.@OBJEXT@: mclex.c
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/mclex.c $(NO_WERROR)
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
endif
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
-srconv.o: sysroff.c
+srconv.@OBJEXT@: sysroff.c
dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
-dlltool.o:
+dlltool.@OBJEXT@:
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
endif
-rescoff.o:
+rescoff.@OBJEXT@:
if am__fastdepCC
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(DLLTOOL_DEFS) $(srcdir)/rescoff.c
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
sysdump_SOURCES = sysdump.c $(BULIBS)
-sysdump.o: sysroff.c
+sysdump.@OBJEXT@: sysroff.c
# coff/sym.h and coff/ecoff.h won't be found by the automatic dependency
# scripts, since they are only included conditionally.
-nlmconv.o: nlmconv.c
+nlmconv.@OBJEXT@: nlmconv.c
if am__fastdepCC
ldname=`echo ld | sed '$(transform)'`; \
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
EXTRA_DIST = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
syslex.c deflex.c defparse.h defparse.c rcparse.h rcparse.c \
- mcparse.h mcparse.c
+ mcparse.h mcparse.c embedspu.sh
diststuff: $(EXTRA_DIST) info
all: info
-DISTCLEANFILES = sysroff.c sysroff.h site.exp site.bak
+# We extract version from bfd/configure.in, make sure to rerun configure
+# when BFD's version changes.
+CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
+
+DISTCLEANFILES = sysroff.c sysroff.h site.exp site.bak embedspu
MOSTLYCLEANFILES = sysinfo$(EXEEXT_FOR_BUILD) bin2c$(EXEEXT_FOR_BUILD) \
binutils.log binutils.sum abcdefgh*