1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = 1.11 no-dist foreign
4 ACLOCAL_AMFLAGS = -I . -I .. -I ../config
6 # Uncomment the following line when doing a release.
9 INCDIR = $(srcdir)/../include
10 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
18 bfdlibdir = @bfdlibdir@
19 bfdincludedir = @bfdincludedir@
20 bfdlib_LTLIBRARIES = libbfd.la
21 bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
23 # Empty these so that the respective installation directories will not be created.
27 rpath_bfdlibdir = @bfdlibdir@
28 noinst_LTLIBRARIES = libbfd.la
29 libbfd_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
32 WARN_CFLAGS = @WARN_CFLAGS@
33 NO_WERROR = @NO_WERROR@
34 AM_CFLAGS = $(WARN_CFLAGS)
35 AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
37 bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
41 # bfd.h goes here, for now
45 # Writing S-records should be included in all (or at least most)
46 # *-*-coff, *-*-aout, etc., configurations, because people will want to
47 # be able to use objcopy to create S-records. (S-records are not useful
48 # for the debugger, so if you are downloading things as S-records you
49 # need two copies of the executable, one to download and one for the
52 archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
53 cache.lo coffgen.lo corefile.lo \
54 format.lo init.lo libbfd.lo opncls.lo reloc.lo \
55 section.lo syms.lo targets.lo hash.lo linker.lo \
56 srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
57 merge.lo dwarf2.lo simple.lo compress.lo verilog.lo
59 BFD64_LIBS = archive64.lo
62 archive.c archures.c bfd.c bfdio.c bfdwin.c \
63 cache.c coffgen.c corefile.c \
64 format.c init.c libbfd.c opncls.c reloc.c \
65 section.c syms.c targets.c hash.c linker.c \
66 srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
67 merge.c dwarf2.c simple.c compress.c verilog.c
69 BFD64_LIBS_CFILES = archive64.c
71 # This list is alphabetized to make it easier to keep in sync
72 # with the decls and initializer in archures.c.
153 ALL_MACHINES_CFILES = \
233 # The .o files needed by all of the 32 bit vectors that are configured into
234 # target_vector in targets.c if configured with --enable-targets=all.
322 elf32-microblaze.lo \
334 elf32-sh-symbian.lo \
423 BFD32_BACKENDS_CFILES = \
610 # The .o files needed by all of the 64 bit vectors that are configured into
611 # target_vector in targets.c if configured with --enable-targets=all
612 # and --enable-64-bit-bfd.
613 # elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in
653 BFD64_BACKENDS_CFILES = \
687 OPTIONAL_BACKENDS = \
698 OPTIONAL_BACKENDS_CFILES = \
709 # We want to rerun configure if configure.in, config.bfd or
710 # configure.host change. configure.in is needed since the version
711 # number in Makefile comes from configure.in.
712 CONFIG_STATUS_DEPENDENCIES = \
713 $(srcdir)/configure.in \
714 $(srcdir)/config.bfd \
715 $(srcdir)/configure.host
717 # These are defined by configure.in:
718 WORDSIZE = @wordsize@
719 ALL_BACKENDS = @all_backends@
720 BFD_BACKENDS = @bfd_backends@
721 BFD_MACHINES = @bfd_machines@
722 TDEFAULTS = @tdefaults@
723 HAVEVECS = @havevecs@
725 INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) \
726 $(HAVEVECS) @INCINTL@
728 # C source files that correspond to .o's.
730 $(BFD32_LIBS_CFILES) \
731 $(BFD64_LIBS_CFILES) \
732 $(ALL_MACHINES_CFILES) \
733 $(BFD32_BACKENDS_CFILES) \
734 $(BFD64_BACKENDS_CFILES) \
735 $(OPTIONAL_BACKENDS_CFILES)
738 elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
740 CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
742 ## This is a list of all .h files which are in the source tree.
744 aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
745 elf-bfd.h elf-hppa.h elf32-hppa.h \
746 elf64-hppa.h elfcode.h elfcore.h \
747 freebsd.h genlink.h go32stub.h \
748 libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
749 libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
750 netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
751 pef.h pef-traceback.h peicode.h som.h version.h \
754 ## ... and all .h files which are in the build tree.
756 bfdver.h elf32-target.h elf64-target.h targmatch.h bfd_stdint.h
758 # Ensure they are built early:
759 BUILT_SOURCES = $(BUILD_HFILES)
761 HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
763 SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES)
764 BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
766 po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
767 for file in $(SRC_POTFILES); do echo $$file; done \
768 | LC_ALL=C sort > tmp.src \
769 && mv tmp.src $(srcdir)/po/SRC-POTFILES.in
771 po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
772 for file in $(BLD_POTFILES); do echo $$file; done \
773 | LC_ALL=C sort > tmp.bld \
774 && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
778 # Various kinds of .o files to put in libbfd.a:
779 # BFD_BACKENDS Routines the configured targets need.
780 # BFD_MACHINES Architecture-specific routines the configured targets need.
781 # COREFILE Core file routines for a native configuration
782 # bfd64_libs Routines for 64bit support
783 OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ @bfd64_libs@
785 stamp-ofiles: Makefile
788 for i in $(OFILES) ; do \
795 $(SHELL) $(srcdir)/../move-if-change tofiles ofiles
798 ofiles: stamp-ofiles ; @true
800 # Since BFD64_LIBS is optional and we can't have substitution in
801 # libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead.
802 # However, list all sources in EXTRA_libbfd_la_SOURCES so the
803 # dependency tracking fragments are picked up in the Makefile.
804 libbfd_la_SOURCES = $(BFD32_LIBS_CFILES)
805 EXTRA_libbfd_la_SOURCES = $(CFILES)
806 libbfd_la_DEPENDENCIES = $(OFILES) ofiles
807 libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL)
808 libbfd_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@
810 # libtool will build .libs/libbfd.a. We create libbfd.a in the build
811 # directory so that we don't have to convert all the programs that use
812 # libbfd.a simultaneously. This is a hack which should be removed if
813 # everything else starts using libtool. FIXME.
815 noinst_LIBRARIES = libbfd.a
819 libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
820 if [ -f $$libtooldir/libbfd.a ]; then \
821 cp $$libtooldir/libbfd.a libbfd.tmp; \
822 $(RANLIB) libbfd.tmp; \
823 $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
827 libbfd.a: stamp-lib ; @true
829 # This file holds an array associating configuration triplets and
830 # vector names. It is built from config.bfd. It is not compiled by
831 # itself, but is included by targets.c.
832 targmatch.h: config.bfd targmatch.sed
834 sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
835 mv -f targmatch.new targmatch.h
837 # When compiling archures.c and targets.c, supply the default target
838 # info from configure.
840 targets.lo: targets.c Makefile
842 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c
843 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
846 source='targets.c' object='$@' libtool=yes @AMDEPBACKSLASH@
847 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
849 $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c
852 archures.lo: archures.c Makefile
854 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c
855 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
858 source='archures.c' object='$@' libtool=yes @AMDEPBACKSLASH@
859 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
861 $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c
864 dwarf2.lo: dwarf2.c Makefile
866 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c
867 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
870 source='dwarf2.c' object='$@' libtool=yes @AMDEPBACKSLASH@
871 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
873 $(LTCOMPILE) -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c
876 elf32-target.h : elfxx-target.h
878 sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
879 mv -f elf32-target.new elf32-target.h
881 elf64-target.h : elfxx-target.h
883 sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
884 mv -f elf64-target.new elf64-target.h
886 elf32-ia64.c : elfnn-ia64.c
888 sed -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
889 mv -f elf32-ia64.new elf32-ia64.c
891 elf64-ia64.c : elfnn-ia64.c
893 sed -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new
894 mv -f elf64-ia64.new elf64-ia64.c
896 peigen.c : peXXigen.c
898 sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new
899 mv -f peigen.new peigen.c
901 pepigen.c : peXXigen.c
903 sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
904 mv -f pepigen.new pepigen.c
906 pex64igen.c: peXXigen.c
908 sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
909 mv -f pex64igen.new pex64igen.c
911 BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
912 LOCAL_H_DEPS= libbfd.h sysdep.h config.h
918 $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
920 host-aout.lo: Makefile
922 # The following program can be used to generate a simple config file
923 # which can be folded into an h-XXX file for a new host, with some editing.
924 aout-params.h: gen-aout
925 ./gen-aout host > aout-params.h
926 gen-aout: $(srcdir)/gen-aout.c Makefile
927 $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c
929 $(BFD_H): stmp-bfd-h ; @true
931 stmp-bfd-h: bfd-in3.h
933 cp bfd-in3.h bfd-tmp.h
934 $(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H)
938 BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
939 reloc.c syms.c bfd.c bfdio.c bfdwin.c \
940 archive.c corefile.c targets.c format.c compress.c
941 BFD64_H_FILES = archive64.c
942 LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \
943 cache.c reloc.c archures.c elf.c
944 LIBCOFF_H_FILES = libcoff-in.h coffcode.h
946 # Could really use a "copy-if-change"...
948 (cd $(bfddocdir); $(MAKE) protos $(FLAGS_TO_PASS))
949 cp $(bfddocdir)/bfd.h bfd-in2.h-new
950 $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
951 cp $(bfddocdir)/libbfd.h libbfd.h-new
952 $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
953 cp $(bfddocdir)/libcoff.h libcoff.h-new
954 $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
956 # We only rebuild the header files automatically if we have been
957 # configured with --enable-maintainer-mode.
959 $(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
960 stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES)
961 (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
962 cp $(bfddocdir)/bfd.h bfd-in2.h-new
963 $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
966 $(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true
967 stmp-lbfd-h: $(LIBBFD_H_FILES)
968 (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
969 cp $(bfddocdir)/libbfd.h libbfd.h-new
970 $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
973 $(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true
974 stmp-lcoff-h: $(LIBCOFF_H_FILES)
975 (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
976 cp $(bfddocdir)/libcoff.h libcoff.h-new
977 $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
980 MOSTLYCLEANFILES = ofiles stamp-ofiles
982 CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
983 stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
985 DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion
987 bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
989 @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
990 bfd_version_string="\"$(VERSION)\"" ;\
991 bfd_soversion="$(VERSION)" ;\
992 bfd_version_package="\"$(PKGVERSION)\"" ;\
993 report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
994 if test "x$(RELEASE)" = x ; then \
995 bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
996 bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
997 bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
999 sed -e "s,@bfd_version@,$$bfd_version," \
1000 -e "s,@bfd_version_string@,$$bfd_version_string," \
1001 -e "s,@bfd_version_package@,$$bfd_version_package," \
1002 -e "s,@report_bugs_to@,$$report_bugs_to," \
1003 < $(srcdir)/version.h > $@; \
1004 echo "$${bfd_soversion}" > libtool-soversion
1006 # Disable -Werror, if it has been enabled, since coffswap.h won't
1007 # compile with gcc 4.5 and above.
1008 coff-tic4x.lo: coff-tic4x.c
1009 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< $(NO_WERROR)
1010 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
1011 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
1012 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1013 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< $(NO_WERROR)
1015 coff-tic54x.lo: coff-tic54x.c
1016 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< $(NO_WERROR)
1017 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
1018 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
1019 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1020 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< $(NO_WERROR)