* Makefile.am (config.status): New target.
[binutils-gdb.git] / bfd / Makefile.am
index 7261cc250972ad3836cfc46f6162db5e024e23c5..ada44bd5d549a9c9448a14549c78386a38264d38 100644 (file)
@@ -1,10 +1,12 @@
 ## Process this file with automake to generate Makefile.in
 
+AUTOMAKE_OPTIONS = cygnus
+
 INCDIR = $(srcdir)/../include
 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
 DEP = mkdep
 
-SUBDIRS = doc
+SUBDIRS = doc po
 
 docdir = doc
 
@@ -13,13 +15,7 @@ lib_LTLIBRARIES = libbfd.la
 # bfd.h goes here, for now
 BFD_H = bfd.h
 
-# Some of these files should be in BFD*_BACKENDS below, but some programs
-# won't link without them.  So, in order for some of the minimal-bfd
-# hacks to work, they're also included here for now.
-#      gdb: elf.o
-#      objdump: elf.o
-#
-# Also, Jim Kingdon notes:
+# Jim Kingdon notes:
 # Writing S-records should be included in all (or at least most)
 # *-*-coff, *-*-aout, etc., configurations, because people will want to
 # be able to use objcopy to create S-records.  (S-records are not useful
@@ -30,13 +26,13 @@ BFD_LIBS = \
        archive.lo archures.lo bfd.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 \
-       elf.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo
+       srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo
 
 BFD_LIBS_CFILES = \
        archive.c archures.c bfd.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 \
-       elf.c srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c
+       srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c
 
 # This list is alphabetized to make it easier to keep in sync
 # with the decls and initializer in archures.c.
@@ -150,6 +146,7 @@ BFD32_BACKENDS = \
        dwarf2.lo \
        ecoff.lo \
        ecofflink.lo \
+       elf.lo \
        elf32-arc.lo \
        elf32-d10v.lo \
        $(start-sanitize-d30v) \
@@ -257,6 +254,7 @@ BFD32_BACKENDS_CFILES = \
        dwarf2.c \
        ecoff.c \
        ecofflink.c \
+       elf.c \
        elf32-arc.c \
        elf32-d10v.c \
        elf32-gen.c \
@@ -383,7 +381,7 @@ BFD_BACKENDS = @bfd_backends@
 BFD_MACHINES = @bfd_machines@
 TDEFAULTS = @tdefaults@
 
-INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES)
+INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
 
 # C source files that correspond to .o's.
 CFILES = \
@@ -393,13 +391,25 @@ CFILES = \
        $(BFD64_BACKENDS_CFILES) \
        $(OPTIONAL_BACKENDS_CFILES)
 
-HFILES = \
+## 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 elf32-hppa.h elf32-target.h elf64-target.h \
+       ecoffswap.h elf32-hppa.h \
        elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.h \
        libbfd.h libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h \
-       libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \
-       targmatch.h
+       libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h
+
+HFILES = \
+       elf32-target.h elf64-target.h targmatch.h \
+       $(SOURCE_HFILES)
+
+POTFILES = $(CFILES) $(SOURCE_HFILES)
+
+po/POTFILES.in: @MAINT@ Makefile
+       for file in $(POTFILES); do echo $$file; done | sort > tmp \
+         && mv tmp $(srcdir)/po/POTFILES.in
+
+diststuff: info
 
 # Various kinds of .o files to put in libbfd.a:
 # BFD_BACKENDS Routines the configured targets need.
@@ -424,8 +434,8 @@ ofiles: stamp-ofiles ; @true
 
 libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
 libbfd_la_DEPENDENCIES = $(OFILES) ofiles
-libbfd_la_LIBADD = `cat ofiles`
-libbfd_la_LDFLAGS = -release $(VERSION)
+libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
+libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
 
 # libtool will build .libs/libbfd.a.  We create libbfd.a in the build
 # directory so that we don't have to convert all the programs that use
@@ -436,8 +446,10 @@ noinst_LIBRARIES = libbfd.a
 libbfd_a_SOURCES =
 
 stamp-lib: libbfd.la
-       cp .libs/libbfd.a libbfd.tmp
-       $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a
+       if [ -f .libs/libbfd.a ]; then \
+         cp .libs/libbfd.a libbfd.tmp; \
+         $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
+       else true; fi
        touch stamp-lib
 
 libbfd.a: stamp-lib ; @true