## Process this file with automake to generate Makefile.in
#
-# Copyright 2012 Free Software Foundation
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
AUTOMAKE_OPTIONS = 1.11 no-dist foreign
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
-# Uncomment the following line when doing a release.
-# RELEASE=y
-
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
libbfd_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
endif
+# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
+# -I../zlib, unless we were configured with --with-system-zlib, in which
+# case both are empty.
+ZLIB = @zlibdir@ -lz
+ZLIBINC = @zlibinc@
+
WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
-AM_CFLAGS = $(WARN_CFLAGS)
+AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
if PLUGINS
bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
# debugger).
BFD32_LIBS = \
archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
- cache.lo coffgen.lo corefile.lo \
- format.lo init.lo libbfd.lo opncls.lo reloc.lo \
- section.lo syms.lo targets.lo hash.lo linker.lo \
- srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
- merge.lo dwarf2.lo simple.lo compress.lo verilog.lo
+ cache.lo coff-bfd.lo compress.lo corefile.lo format.lo hash.lo \
+ init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \
+ section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo \
+ binary.lo ihex.lo srec.lo tekhex.lo verilog.lo
BFD64_LIBS = archive64.lo
BFD32_LIBS_CFILES = \
archive.c archures.c bfd.c bfdio.c bfdwin.c \
- cache.c coffgen.c corefile.c \
- format.c init.c libbfd.c opncls.c reloc.c \
- section.c syms.c targets.c hash.c linker.c \
- srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
- merge.c dwarf2.c simple.c compress.c verilog.c
+ cache.c coff-bfd.c compress.c corefile.c format.c hash.c \
+ init.c libbfd.c linker.c merge.c opncls.c reloc.c \
+ section.c simple.c stab-syms.c stabs.c syms.c targets.c \
+ binary.c ihex.c srec.c tekhex.c verilog.c
BFD64_LIBS_CFILES = archive64.c
cpu-epiphany.lo \
cpu-fr30.lo \
cpu-frv.lo \
+ cpu-ft32.lo \
cpu-h8300.lo \
cpu-h8500.lo \
cpu-hppa.lo \
cpu-i370.lo \
cpu-i386.lo \
+ cpu-iamcu.lo \
cpu-l1om.lo \
cpu-k1om.lo \
cpu-i860.lo \
cpu-moxie.lo \
cpu-msp430.lo \
cpu-mt.lo \
+ cpu-nds32.lo \
cpu-nios2.lo \
cpu-ns32k.lo \
- cpu-openrisc.lo \
- cpu-or32.lo \
+ cpu-or1k.lo \
cpu-pdp11.lo \
cpu-pj.lo \
cpu-plugin.lo \
cpu-powerpc.lo \
+ cpu-pru.lo \
cpu-rs6000.lo \
+ cpu-riscv.lo \
cpu-rl78.lo \
cpu-rx.lo \
cpu-s390.lo \
cpu-v850.lo \
cpu-v850_rh850.lo \
cpu-vax.lo \
+ cpu-visium.lo \
cpu-w65.lo \
cpu-we32k.lo \
cpu-xc16x.lo \
cpu-epiphany.c \
cpu-fr30.c \
cpu-frv.c \
+ cpu-ft32.c \
cpu-h8300.c \
cpu-h8500.c \
cpu-hppa.c \
cpu-i370.c \
cpu-i386.c \
+ cpu-iamcu.c \
cpu-l1om.c \
cpu-k1om.c \
cpu-i860.c \
cpu-moxie.c \
cpu-msp430.c \
cpu-mt.c \
+ cpu-nds32.c \
cpu-ns32k.c \
cpu-nios2.c \
- cpu-openrisc.c \
- cpu-or32.c \
+ cpu-or1k.c \
cpu-pdp11.c \
cpu-pj.c \
cpu-plugin.c \
cpu-powerpc.c \
+ cpu-pru.c \
cpu-rs6000.c \
+ cpu-riscv.c \
cpu-rl78.c \
cpu-rx.c \
cpu-s390.c \
cpu-v850.c \
cpu-v850_rh850.c \
cpu-vax.c \
+ cpu-visium.c \
cpu-w65.c \
cpu-we32k.c \
cpu-xc16x.c \
coff-m68k.lo \
coff-m88k.lo \
coff-mips.lo \
- coff-or32.lo \
coff-rs6000.lo \
coff-sh.lo \
coff-sparc.lo \
coff-we32k.lo \
coff-z80.lo \
coff-z8k.lo \
+ coffgen.lo \
cofflink.lo \
dwarf1.lo \
+ dwarf2.lo \
ecoff.lo \
ecofflink.lo \
elf-attrs.lo \
elf32-epiphany.lo \
elf32-fr30.lo \
elf32-frv.lo \
+ elf32-ft32.lo \
elf32-gen.lo \
elf32-h8300.lo \
elf32-hppa.lo \
elf32-moxie.lo \
elf32-msp430.lo \
elf32-mt.lo \
+ elf32-nds32.lo \
elf32-nios2.lo \
- elf32-openrisc.lo \
- elf32-or32.lo \
+ elf32-or1k.lo \
elf32-pj.lo \
elf32-ppc.lo \
+ elf32-pru.lo \
elf32-rl78.lo \
elf32-rx.lo \
elf32-s390.lo \
elf32-tilepro.lo \
elf32-v850.lo \
elf32-vax.lo \
+ elf32-visium.lo \
elf32-xc16x.lo \
elf32-xgate.lo \
elf32-xstormy16.lo \
m88kopenbsd.lo \
mach-o.lo \
mach-o-i386.lo \
+ mach-o-arm.lo \
mipsbsd.lo \
newsos3.lo \
nlm.lo \
coff-m68k.c \
coff-m88k.c \
coff-mips.c \
- coff-or32.c \
coff-rs6000.c \
coff-sh.c \
coff-sparc.c \
coff-we32k.c \
coff-z80.c \
coff-z8k.c \
+ coffgen.c \
cofflink.c \
dwarf1.c \
+ dwarf2.c \
ecoff.c \
ecofflink.c \
elf-attrs.c \
elf32-epiphany.c \
elf32-fr30.c \
elf32-frv.c \
+ elf32-ft32.c \
elf32-gen.c \
elf32-h8300.c \
elf32-hppa.c \
elf32-moxie.c \
elf32-msp430.c \
elf32-mt.c \
+ elf32-nds32.c \
elf32-nios2.c \
- elf32-openrisc.c \
- elf32-or32.c \
+ elf32-or1k.c \
elf32-pj.c \
elf32-ppc.c \
+ elf32-pru.c \
elf32-rl78.c \
elf32-rx.c \
elf32-s390.c \
elf32-tilepro.c \
elf32-v850.c \
elf32-vax.c \
+ elf32-visium.c \
elf32-xc16x.c \
elf32-xgate.c \
elf32-xstormy16.c \
m88kopenbsd.c \
mach-o.c \
mach-o-i386.c \
+ mach-o-arm.c \
mipsbsd.c \
newsos3.c \
nlm.c \
# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in
# BFD32_BACKENDS.
BFD64_BACKENDS = \
+ elf32-aarch64.lo \
elf64-aarch64.lo \
+ elfxx-aarch64.lo \
aix5ppc-core.lo \
aout64.lo \
coff-alpha.lo \
elf64-hppa.lo \
elf64-ia64.lo \
elf64-ia64-vms.lo \
+ elfxx-ia64.lo \
+ elfn32-mips.lo \
elf64-mips.lo \
+ elfxx-mips.lo \
elf64-mmix.lo \
elf64-ppc.lo \
+ elf32-riscv.lo \
+ elf64-riscv.lo \
+ elfxx-riscv.lo \
elf64-s390.lo \
elf64-sh64.lo \
elf64-sparc.lo \
elf64-tilegx.lo \
elf64-x86-64.lo \
elf64.lo \
- elfn32-mips.lo \
- elfxx-ia64.lo \
- elfxx-mips.lo \
+ mach-o-aarch64.lo \
mach-o-x86-64.lo \
mmo.lo \
nlm32-alpha.lo \
elf64-x86-64.c \
elf64.c \
elfn32-mips.c \
+ elfxx-aarch64.c \
elfxx-ia64.c \
elfxx-mips.c \
+ elfxx-riscv.c \
+ mach-o-aarch64.c \
mach-o-x86-64.c \
mmo.c \
nlm32-alpha.c \
hpux-core.lo \
irix-core.lo \
lynx-core.lo \
+ netbsd-core.lo \
osf-core.lo \
rs6000-core.lo \
sco5-core.lo \
hpux-core.c \
irix-core.c \
lynx-core.c \
+ netbsd-core.c \
osf-core.c \
rs6000-core.c \
sco5-core.c \
trad-core.c
-# We want to rerun configure if configure.in, config.bfd or
-# configure.host change. configure.in is needed since the version
-# number in Makefile comes from configure.in.
+# Reconfigure if config.bfd or configure.host changes.
+# development.sh is used to determine -Werror default.
CONFIG_STATUS_DEPENDENCIES = \
- $(srcdir)/configure.in \
$(srcdir)/config.bfd \
- $(srcdir)/configure.host
+ $(srcdir)/configure.host \
+ $(srcdir)/development.sh
-# These are defined by configure.in:
+# These are defined by configure:
WORDSIZE = @wordsize@
ALL_BACKENDS = @all_backends@
BFD_BACKENDS = @bfd_backends@
$(OPTIONAL_BACKENDS_CFILES)
BUILD_CFILES = \
- elf64-aarch64.c \
- elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
+ elf32-aarch64.c elf64-aarch64.c \
+ elf32-ia64.c elf64-ia64.c \
+ elf32-riscv.c elf64-riscv.c \
+ peigen.c pepigen.c pex64igen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf-linux-psinfo.h elf32-hppa.h \
+ elf-bfd.h elf-hppa.h elf-linux-core.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h \
freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
libbfd_la_SOURCES = $(BFD32_LIBS_CFILES)
EXTRA_libbfd_la_SOURCES = $(CFILES)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
-libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL)
+libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB)
libbfd_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@
# libtool will build .libs/libbfd.a. We create libbfd.a in the build
libbfd_a_SOURCES =
stamp-lib: libbfd.la
- libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
+ libtooldir=`$(LIBTOOL) --config | $(SED) -n -e 's/^objdir=//p'`; \
if [ -f $$libtooldir/libbfd.a ]; then \
cp $$libtooldir/libbfd.a libbfd.tmp; \
$(RANLIB) libbfd.tmp; \
# itself, but is included by targets.c.
targmatch.h: config.bfd targmatch.sed
rm -f targmatch.h
- sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
+ $(SED) -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
mv -f targmatch.new targmatch.h
# When compiling archures.c and targets.c, supply the default target
elf32-target.h : elfxx-target.h
rm -f elf32-target.h
- sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
+ $(SED) -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
mv -f elf32-target.new elf32-target.h
elf64-target.h : elfxx-target.h
rm -f elf64-target.h
- sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
+ $(SED) -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
mv -f elf64-target.new elf64-target.h
+elf32-aarch64.c : elfnn-aarch64.c
+ rm -f elf32-aarch64.c
+ echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf32-aarch64.new
+ $(SED) -e s/NN/32/g < $(srcdir)/elfnn-aarch64.c >> elf32-aarch64.new
+ mv -f elf32-aarch64.new elf32-aarch64.c
+
elf64-aarch64.c : elfnn-aarch64.c
rm -f elf64-aarch64.c
- sed -e s/NN/64/g < $(srcdir)/elfnn-aarch64.c > elf64-aarch64.new
+ echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf64-aarch64.new
+ $(SED) -e s/NN/64/g < $(srcdir)/elfnn-aarch64.c >> elf64-aarch64.new
mv -f elf64-aarch64.new elf64-aarch64.c
elf32-ia64.c : elfnn-ia64.c
rm -f elf32-ia64.c
- sed -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
+ $(SED) -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
mv -f elf32-ia64.new elf32-ia64.c
elf64-ia64.c : elfnn-ia64.c
rm -f elf64-ia64.c
- sed -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new
+ $(SED) -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new
mv -f elf64-ia64.new elf64-ia64.c
+elf32-riscv.c : elfnn-riscv.c
+ rm -f elf32-riscv.c
+ echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf32-riscv.new
+ sed -e s/NN/32/g < $(srcdir)/elfnn-riscv.c >> elf32-riscv.new
+ mv -f elf32-riscv.new elf32-riscv.c
+
+elf64-riscv.c : elfnn-riscv.c
+ rm -f elf64-riscv.c
+ echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf64-riscv.new
+ sed -e s/NN/64/g < $(srcdir)/elfnn-riscv.c >> elf64-riscv.new
+ mv -f elf64-riscv.new elf64-riscv.c
+
peigen.c : peXXigen.c
rm -f peigen.c
- sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new
+ $(SED) -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new
mv -f peigen.new peigen.c
pepigen.c : peXXigen.c
rm -f pepigen.c
- sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
+ $(SED) -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
mv -f pepigen.new pepigen.c
pex64igen.c: peXXigen.c
rm -f pex64igen.c
- sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
+ $(SED) -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
mv -f pex64igen.new pex64igen.c
BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
rm -f bfd-tmp.h
touch stmp-bfd-h
-BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
- reloc.c syms.c bfd.c bfdio.c bfdwin.c \
- archive.c corefile.c targets.c format.c compress.c
+BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c \
+ bfdio.c bfdwin.c section.c archures.c reloc.c \
+ syms.c bfd.c archive.c corefile.c targets.c format.c \
+ linker.c simple.c compress.c
BFD64_H_FILES = archive64.c
-LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \
- cache.c reloc.c archures.c elf.c
+LIBBFD_H_FILES = libbfd-in.h libbfd.c bfdio.c bfdwin.c \
+ cache.c reloc.c archures.c linker.c
LIBCOFF_H_FILES = libcoff-in.h coffcode.h
# Could really use a "copy-if-change"...
DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion
-bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
+bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
@echo "creating $@"
- @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
+ @bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
bfd_version_string="\"$(VERSION)\"" ;\
bfd_soversion="$(VERSION)" ;\
bfd_version_package="\"$(PKGVERSION)\"" ;\
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
- if test "x$(RELEASE)" = x ; then \
- bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
+ . $(srcdir)/development.sh ;\
+ if test "$$development" = true ; then \
+ bfd_version_date=`$(SED) -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
fi ;\
- sed -e "s,@bfd_version@,$$bfd_version," \
+ $(SED) -e "s,@bfd_version@,$$bfd_version," \
-e "s,@bfd_version_string@,$$bfd_version_string," \
-e "s,@bfd_version_package@,$$bfd_version_package," \
-e "s,@report_bugs_to@,$$report_bugs_to," \