* Makefile.am (config.status): New target.
[binutils-gdb.git] / bfd / Makefile.am
index 3392cf80792a39adb3f4b03209793adc8c9e5068..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.
@@ -66,6 +62,7 @@ ALL_MACHINES = \
        cpu-rs6000.lo \
        cpu-sh.lo \
        cpu-sparc.lo \
+       cpu-tic30.lo \
        $(start-sanitize-tic80) \
        cpu-tic80.lo \
        $(end-sanitize-tic80) \
@@ -97,6 +94,7 @@ ALL_MACHINES_CFILES = \
        cpu-rs6000.c \
        cpu-sh.c \
        cpu-sparc.c \
+       cpu-tic30.c \
        cpu-v850.c \
        cpu-vax.c \
        cpu-we32k.c \
@@ -110,6 +108,7 @@ BFD32_BACKENDS = \
        aout-arm.lo \
        aout-ns32k.lo \
        aout-sparcle.lo \
+       aout-tic30.lo \
        aout0.lo \
        aout32.lo \
        bout.lo \
@@ -135,6 +134,7 @@ BFD32_BACKENDS = \
        coff-sparc.lo \
        coff-stgo32.lo \
        coff-svm68k.lo \
+       coff-tic30.lo \
        $(start-sanitize-tic80) \
        coff-tic80.lo \
        $(end-sanitize-tic80) \
@@ -146,6 +146,7 @@ BFD32_BACKENDS = \
        dwarf2.lo \
        ecoff.lo \
        ecofflink.lo \
+       elf.lo \
        elf32-arc.lo \
        elf32-d10v.lo \
        $(start-sanitize-d30v) \
@@ -209,6 +210,7 @@ BFD32_BACKENDS = \
        sparclynx.lo \
        sparcnetbsd.lo \
        sunos.lo \
+       vaxnetbsd.lo \
        versados.lo \
        xcofflink.lo
 
@@ -217,6 +219,7 @@ BFD32_BACKENDS_CFILES = \
        aout-arm.c \
        aout-ns32k.c \
        aout-sparcle.c \
+       aout-tic30.c \
        aout0.c \
        aout32.c \
        bout.c \
@@ -242,6 +245,7 @@ BFD32_BACKENDS_CFILES = \
        coff-sparc.c \
        coff-stgo32.c \
        coff-svm68k.c \
+       coff-tic30.c \
        coff-u68k.c \
        coff-we32k.c \
        coff-w65.c \
@@ -250,6 +254,7 @@ BFD32_BACKENDS_CFILES = \
        dwarf2.c \
        ecoff.c \
        ecofflink.c \
+       elf.c \
        elf32-arc.c \
        elf32-d10v.c \
        elf32-gen.c \
@@ -310,6 +315,7 @@ BFD32_BACKENDS_CFILES = \
        sparclynx.c \
        sparcnetbsd.c \
        sunos.c \
+       vaxnetbsd.c \
        versados.c \
        xcofflink.c
 
@@ -375,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 = \
@@ -385,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.
@@ -416,7 +434,8 @@ ofiles: stamp-ofiles ; @true
 
 libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
 libbfd_la_DEPENDENCIES = $(OFILES) ofiles
-libbfd_la_LIBADD = `cat ofiles`
+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
@@ -427,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
@@ -550,21 +571,21 @@ headers:
 # We only rebuild the header files automatically if we have been
 # configured with --enable-maintainer-mode.
 
-$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h
+$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
 stmp-bin2-h: $(BFD_H_FILES)
        (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
        cp $(docdir)/bfd.h bfd-in2.h-new
        $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
        touch stmp-bin2-h
 
-$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h
+$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true
 stmp-lbfd-h: $(LIBBFD_H_FILES)
        (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
        cp $(docdir)/libbfd.h libbfd.h-new
        $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
        touch stmp-lbfd-h
 
-$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h
+$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true
 stmp-lcoff-h: $(LIBCOFF_H_FILES)
        (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
        cp $(docdir)/libcoff.h libcoff.h-new
@@ -644,6 +665,7 @@ cpu-powerpc.lo: cpu-powerpc.c
 cpu-rs6000.lo: cpu-rs6000.c
 cpu-sh.lo: cpu-sh.c
 cpu-sparc.lo: cpu-sparc.c
+cpu-tic30.lo: cpu-tic30.c
 cpu-v850.lo: cpu-v850.c
 cpu-vax.lo: cpu-vax.c
 cpu-we32k.lo: cpu-we32k.c
@@ -661,6 +683,9 @@ aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \
   libaout.h aoutf1.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \
   $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
   aout-target.h
+aout-tic30.lo: aout-tic30.c libaout.h $(INCDIR)/bfdlink.h \
+  $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+  $(INCDIR)/aout/ar.h aoutx.h
 aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
   $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
@@ -728,6 +753,8 @@ coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/coff/i386.h \
 coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
   $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
   coffcode.h coffswap.h
+coff-tic30.lo: coff-tic30.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h \
+  $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
 coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
   $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
   coffcode.h coffswap.h
@@ -923,6 +950,9 @@ sparcnetbsd.lo: sparcnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
 sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
   $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
   $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
+vaxnetbsd.lo: vaxnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+  aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+  $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
 versados.lo: versados.c $(INCDIR)/libiberty.h
 xcofflink.lo: xcofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
   libcoff.h