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)
15 bfdlibdir = @bfdlibdir@
16 bfdincludedir = @bfdincludedir@
18 bfdlib_LTLIBRARIES = libbfd.la
20 WARN_CFLAGS = @WARN_CFLAGS@
21 NO_WERROR = @NO_WERROR@
22 AM_CFLAGS = $(WARN_CFLAGS)
23 AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
28 # bfd.h goes here, for now
32 # Writing S-records should be included in all (or at least most)
33 # *-*-coff, *-*-aout, etc., configurations, because people will want to
34 # be able to use objcopy to create S-records. (S-records are not useful
35 # for the debugger, so if you are downloading things as S-records you
36 # need two copies of the executable, one to download and one for the
39 archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
40 cache.lo coffgen.lo corefile.lo \
41 format.lo init.lo libbfd.lo opncls.lo reloc.lo \
42 section.lo syms.lo targets.lo hash.lo linker.lo \
43 srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
44 merge.lo dwarf2.lo simple.lo compress.lo verilog.lo
46 BFD64_LIBS = archive64.lo
49 archive.c archures.c bfd.c bfdio.c bfdwin.c \
50 cache.c coffgen.c corefile.c \
51 format.c init.c libbfd.c opncls.c reloc.c \
52 section.c syms.c targets.c hash.c linker.c \
53 srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
54 merge.c dwarf2.c simple.c compress.c verilog.c
56 BFD64_LIBS_CFILES = archive64.c
58 # This list is alphabetized to make it easier to keep in sync
59 # with the decls and initializer in archures.c.
131 ALL_MACHINES_CFILES = \
202 # The .o files needed by all of the 32 bit vectors that are configured into
203 # target_vector in targets.c if configured with --enable-targets=all.
290 elf32-microblaze.lo \
300 elf32-sh-symbian.lo \
388 BFD32_BACKENDS_CFILES = \
571 # The .o files needed by all of the 64 bit vectors that are configured into
572 # target_vector in targets.c if configured with --enable-targets=all
573 # and --enable-64-bit-bfd.
574 # elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in
608 BFD64_BACKENDS_CFILES = \
636 OPTIONAL_BACKENDS = \
646 OPTIONAL_BACKENDS_CFILES = \
656 # We want to rerun configure if configure.in, config.bfd or
657 # configure.host change. configure.in is needed since the version
658 # number in Makefile comes from configure.in.
659 CONFIG_STATUS_DEPENDENCIES = \
660 $(srcdir)/configure.in \
661 $(srcdir)/config.bfd \
662 $(srcdir)/configure.host
664 # These are defined by configure.in:
665 WORDSIZE = @wordsize@
666 ALL_BACKENDS = @all_backends@
667 BFD_BACKENDS = @bfd_backends@
668 BFD_MACHINES = @bfd_machines@
669 TDEFAULTS = @tdefaults@
671 INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) @INCINTL@
673 # C source files that correspond to .o's.
675 $(BFD32_LIBS_CFILES) \
676 $(BFD64_LIBS_CFILES) \
677 $(ALL_MACHINES_CFILES) \
678 $(BFD32_BACKENDS_CFILES) \
679 $(BFD64_BACKENDS_CFILES) \
680 $(OPTIONAL_BACKENDS_CFILES)
683 elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
685 CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
687 ## This is a list of all .h files which are in the source tree.
689 aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
690 elf-bfd.h elf-hppa.h elf32-hppa.h \
691 elf64-hppa.h elfcode.h elfcore.h \
692 freebsd.h genlink.h go32stub.h \
693 libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
694 libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
695 netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
696 pef.h pef-traceback.h peicode.h som.h version.h \
697 vms.h xcoff-target.h xsym.h
699 ## ... and all .h files which are in the build tree.
701 bfdver.h elf32-target.h elf64-target.h targmatch.h bfd_stdint.h
703 # Ensure they are built early:
704 BUILT_SOURCES = $(BUILD_HFILES)
706 HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
708 SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES)
709 BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
711 po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
712 for file in $(SRC_POTFILES); do echo $$file; done \
713 | LC_ALL=C sort > tmp.src \
714 && mv tmp.src $(srcdir)/po/SRC-POTFILES.in
716 po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
717 for file in $(BLD_POTFILES); do echo $$file; done \
718 | LC_ALL=C sort > tmp.bld \
719 && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
723 # Various kinds of .o files to put in libbfd.a:
724 # BFD_BACKENDS Routines the configured targets need.
725 # BFD_MACHINES Architecture-specific routines the configured targets need.
726 # COREFILE Core file routines for a native configuration
727 # bfd64_libs Routines for 64bit support
728 OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ @bfd64_libs@
730 stamp-ofiles: Makefile
733 for i in $(OFILES) ; do \
740 $(SHELL) $(srcdir)/../move-if-change tofiles ofiles
743 ofiles: stamp-ofiles ; @true
745 # Since BFD64_LIBS is optional and we can't have substitution in
746 # libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead.
747 # However, list all sources in EXTRA_libbfd_la_SOURCES so the
748 # dependency tracking fragments are picked up in the Makefile.
749 libbfd_la_SOURCES = $(BFD32_LIBS_CFILES)
750 EXTRA_libbfd_la_SOURCES = $(CFILES)
751 libbfd_la_DEPENDENCIES = $(OFILES) ofiles
752 libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL)
753 libbfd_la_LDFLAGS = -release `cat libtool-soversion` @SHARED_LDFLAGS@
755 # libtool will build .libs/libbfd.a. We create libbfd.a in the build
756 # directory so that we don't have to convert all the programs that use
757 # libbfd.a simultaneously. This is a hack which should be removed if
758 # everything else starts using libtool. FIXME.
760 noinst_LIBRARIES = libbfd.a
764 libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
765 if [ -f $$libtooldir/libbfd.a ]; then \
766 cp $$libtooldir/libbfd.a libbfd.tmp; \
767 $(RANLIB) libbfd.tmp; \
768 $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
772 libbfd.a: stamp-lib ; @true
774 # This file holds an array associating configuration triplets and
775 # vector names. It is built from config.bfd. It is not compiled by
776 # itself, but is included by targets.c.
777 targmatch.h: config.bfd targmatch.sed
779 sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
780 mv -f targmatch.new targmatch.h
782 # When compiling archures.c and targets.c, supply the default target
783 # info from configure.
785 targets.lo: targets.c Makefile
787 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c
788 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
791 source='targets.c' object='$@' libtool=yes @AMDEPBACKSLASH@
792 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
794 $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c
797 archures.lo: archures.c Makefile
799 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c
800 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
803 source='archures.c' object='$@' libtool=yes @AMDEPBACKSLASH@
804 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
806 $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c
809 dwarf2.lo: dwarf2.c Makefile
811 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c
812 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
815 source='dwarf2.c' object='$@' libtool=yes @AMDEPBACKSLASH@
816 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
818 $(LTCOMPILE) -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c
821 elf32-target.h : elfxx-target.h
823 sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
824 mv -f elf32-target.new elf32-target.h
826 elf64-target.h : elfxx-target.h
828 sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
829 mv -f elf64-target.new elf64-target.h
831 elf32-ia64.c : elfxx-ia64.c
833 sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new
834 mv -f elf32-ia64.new elf32-ia64.c
836 elf64-ia64.c : elfxx-ia64.c
838 sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new
839 mv -f elf64-ia64.new elf64-ia64.c
841 peigen.c : peXXigen.c
843 sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new
844 mv -f peigen.new peigen.c
846 pepigen.c : peXXigen.c
848 sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
849 mv -f pepigen.new pepigen.c
851 pex64igen.c: peXXigen.c
853 sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
854 mv -f pex64igen.new pex64igen.c
856 BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
857 LOCAL_H_DEPS= libbfd.h sysdep.h config.h
863 $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
865 install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libbfd
868 uninstall-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@uninstall_libbfd
871 .PHONY: install_libbfd uninstall_libbfd
872 install_libbfd: $(bfdlib_LTLIBRARIES) $(BFD_H)
873 $(mkinstalldirs) $(DESTDIR)$(bfdlibdir)
874 $(mkinstalldirs) $(DESTDIR)$(bfdincludedir)
875 @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
876 if test -f $$p; then \
877 echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
878 $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
881 $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(bfdincludedir)/bfd.h
882 $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(bfdincludedir)/ansidecl.h
883 $(INSTALL_DATA) $(INCDIR)/symcat.h $(DESTDIR)$(bfdincludedir)/symcat.h
884 $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(bfdincludedir)/bfdlink.h
887 list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
888 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bfdlibdir)/$$p; \
890 rm -f $(DESTDIR)$(bfdincludedir)/bfd.h
891 rm -f $(DESTDIR)$(bfdincludedir)/ansidecl.h
892 rm -f $(DESTDIR)$(bfdincludedir)/symcat.h
893 rm -f $(DESTDIR)$(bfdincludedir)/bfdlink.h
895 host-aout.lo: Makefile
897 # The following program can be used to generate a simple config file
898 # which can be folded into an h-XXX file for a new host, with some editing.
899 aout-params.h: gen-aout
900 ./gen-aout host > aout-params.h
901 gen-aout: $(srcdir)/gen-aout.c Makefile
902 $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c
904 $(BFD_H): stmp-bfd-h ; @true
906 stmp-bfd-h: bfd-in3.h
908 cp bfd-in3.h bfd-tmp.h
909 $(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H)
913 BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
914 reloc.c syms.c bfd.c bfdio.c bfdwin.c \
915 archive.c corefile.c targets.c format.c compress.c
916 BFD64_H_FILES = archive64.c
917 LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \
918 cache.c reloc.c archures.c elf.c
919 LIBCOFF_H_FILES = libcoff-in.h coffcode.h
921 # Could really use a "copy-if-change"...
923 (cd $(bfddocdir); $(MAKE) protos $(FLAGS_TO_PASS))
924 cp $(bfddocdir)/bfd.h bfd-in2.h-new
925 $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
926 cp $(bfddocdir)/libbfd.h libbfd.h-new
927 $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
928 cp $(bfddocdir)/libcoff.h libcoff.h-new
929 $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
931 # We only rebuild the header files automatically if we have been
932 # configured with --enable-maintainer-mode.
934 $(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
935 stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES)
936 (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
937 cp $(bfddocdir)/bfd.h bfd-in2.h-new
938 $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
941 $(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true
942 stmp-lbfd-h: $(LIBBFD_H_FILES)
943 (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
944 cp $(bfddocdir)/libbfd.h libbfd.h-new
945 $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
948 $(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true
949 stmp-lcoff-h: $(LIBCOFF_H_FILES)
950 (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
951 cp $(bfddocdir)/libcoff.h libcoff.h-new
952 $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
955 MOSTLYCLEANFILES = ofiles stamp-ofiles
957 CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
958 stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
960 DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion
962 bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
964 @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
965 bfd_version_string="\"$(VERSION)\"" ;\
966 bfd_soversion="$(VERSION)" ;\
967 bfd_version_package="\"$(PKGVERSION)\"" ;\
968 report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
969 if test "x$(RELEASE)" = x ; then \
970 bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
971 bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
972 bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
974 sed -e "s,@bfd_version@,$$bfd_version," \
975 -e "s,@bfd_version_string@,$$bfd_version_string," \
976 -e "s,@bfd_version_package@,$$bfd_version_package," \
977 -e "s,@report_bugs_to@,$$report_bugs_to," \
978 < $(srcdir)/version.h > $@; \
979 echo "$${bfd_soversion}" > libtool-soversion