Wed Jul 13 18:01:58 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
[deliverable/binutils-gdb.git] / gas / Makefile.in
index 5230f730c7d3a256d0df7c305ecb99b9f8d5b07a..332e9d812a463947251ed4936d1cf1de35916751 100644 (file)
@@ -1,30 +1,31 @@
 # Makefile for GNU Assembler
-#   Copyright (C) 1987-1992 Free Software Foundation, Inc.
+#   Copyright (C) 1987-1992, 1993 Free Software Foundation, Inc.
 
-#This file is part of GNU GAS.
+# This file is part of GNU GAS.
 
-#GNU GAS 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 2, or (at your option)
-#any later version.
+# GNU GAS 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 2, or (at your option)
+# any later version.
 
-#GNU GAS 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.
+# GNU GAS 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 GNU GAS; see the file COPYING.  If not, write to
-#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+# You should have received a copy of the GNU General Public License
+# along with GNU GAS; see the file COPYING.  If not, write to
+# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
 # The targets for external use include:
 # all, doc, proto, install, uninstall, includes, TAGS,
-# clean, cleanconfig, realclean, stage1, stage2, stage3, stage4.
+# clean, mostlyclean, distclean, realclean, stage1, stage2, stage3, stage4.
 
 # Variables that exist for you to override.
 # See below for how to change them for certain systems.
 
 srcdir = .
+srcroot = $(srcdir)/..
 
 prefix = /usr/local
 
@@ -49,19 +50,62 @@ infodir = $(prefix)/info
 includedir = $(prefix)/include
 docdir = $(datadir)/doc
 
+VERSION=cygnus-2.3.1
+
 SHELL = /bin/sh
 
-INSTALL = install -c
+INSTALL = $${srcroot}/install.sh -c
 INSTALL_PROGRAM = $(INSTALL)
 INSTALL_DATA = $(INSTALL)
+INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
+INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
 
 AR = ar
 AR_FLAGS = qv
 BISON = bison
 MAKEINFO = makeinfo
+TEXI2DVI = texi2dvi
 RANLIB = ranlib
 CFLAGS = -g
 
+MAKEOVERRIDES=
+
+AS_FOR_TARGET = $${here}/as.new
+
+CC_FOR_TARGET = ` \
+  if [ -f $${here}/../gcc/Makefile ] ; then \
+    echo $${here}/../gcc/xgcc -B$${here}/../gcc/; \
+  else \
+    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+      echo $(CC); \
+    else \
+      t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
+    fi; \
+  fi`
+
+NM_FOR_TARGET = ` \
+  if [ -f $${here}/../binutils/Makefile ] ; then \
+    echo $${here}/../binutils/nm ; \
+  else \
+    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+      echo $(NM); \
+    else \
+       t='$(program_transform_name)'; echo nm | sed -e 's/brokensed/brokensed/' $$t ; \
+    fi; \
+  fi`
+
+OBJDUMP=objdump
+OBJDUMP_FOR_TARGET = ` \
+  if [ -f $${here}/../binutils/Makefile ] ; then \
+    echo $${here}/../binutils/objdump ; \
+  else \
+    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+      echo $(OBJDUMP); \
+    else \
+       t='$(program_transform_name)'; echo objdump | sed -e 's/brokensed/brokensed/' $$t ; \
+    fi; \
+  fi`
+
 FLAGS_TO_PASS = \
        "prefix=$(prefix)" \
        "exec_prefix=$(exec_prefix)" \
@@ -80,6 +124,15 @@ FLAGS_TO_PASS = \
        "INSTALL_DATA=$(INSTALL_DATA)" \
        "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
 
+RUNTEST=runtest
+CHECKFLAGS= \
+       "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
+       "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
+       "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
+       "OBJDUMP_FOR_TARGET=$(OBJDUMP_FOR_TARGET)" \
+       "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+       "RUNTEST=$(RUNTEST)"
+
 # Lists of files for various purposes.
 
 REAL_SOURCES = \
@@ -97,6 +150,7 @@ REAL_SOURCES = \
        $(srcdir)/hex-value.c \
        $(srcdir)/input-file.c \
        $(srcdir)/input-scrub.c \
+       $(srcdir)/literal.c \
        $(srcdir)/messages.c \
        $(srcdir)/output-file.c \
        $(srcdir)/read.c \
@@ -104,6 +158,8 @@ REAL_SOURCES = \
        $(srcdir)/symbols.c \
        $(srcdir)/write.c \
        $(srcdir)/listing.c \
+       $(srcdir)/ecoff.c \
+       $(srcdir)/stabs.c \
        $(srcdir)/xmalloc.c
 
 # in an expedient order
@@ -129,7 +185,8 @@ REAL_HEADERS = \
        $(srcdir)/struc-symbol.h \
        $(srcdir)/subsegs.h \
        $(srcdir)/symbols.h \
-       $(srcdir)/write.h
+       $(srcdir)/write.h \
+       $(srcdir)/ecoff.h
 
 LINKED_HEADERS = \
        a.out.gnu.h \
@@ -142,6 +199,8 @@ LINKED_HEADERS = \
 
 HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
 
+#### host, target, and site specific Makefile frags come in here.
+
 OBJS = \
        targ-cpu.o \
        obj-format.o \
@@ -160,49 +219,57 @@ OBJS = \
        hex-value.o \
        input-file.o \
        input-scrub.o \
+       literal.o \
        messages.o \
        output-file.o \
        read.o \
        subsegs.o \
        symbols.o \
-       version.o \
        write.o \
        listing.o \
-       xmalloc.o
-
-#### host, target, and site specific Makefile frags come in here.
-
-VERSION=2.0.1-alpha
-
-all: as.new
-       @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
-
-info:
-       @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) info)
-
-install-info:
-       @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) install-info)
-
-clean-info:
-       @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean-info)
+       ecoff.o \
+       stabs.o \
+       xmalloc.o \
+       $(TE_OBJS)
+
+# These are objects we know we'll be pulling in from other directories.
+# For VMS, we have to build them explicitly.
+VMS_OTHER_OBJS = \
+       ../libiberty/obstack.o \
+       ../libiberty/strdup.o \
+       ../libiberty/strncasecmp.o \
+       ../libiberty/getruntime.o
+
+all: as.new gasp.new
+       @srcroot=`cd $(srcroot); pwd`; export srcroot; \
+       (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
+
+dvi info install-info clean-info:
+       @srcroot=`cd $(srcroot); pwd`; export srcroot; \
+       (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
+
+make-gas.com: stamp-mk.com
+stamp-mk.com: vmsconf.sh Makefile
+       sh $(srcdir)/vmsconf.sh $(OBJS) $(VMS_OTHER_OBJS) > new-make.com
+       $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
+       touch stamp-mk.com
 
 # Now figure out from those variables how to compile and link.
 
 # This is the variable actually used when we compile.
-ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES) \
-       $(BFDDEF)
+ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
 
 # How to link with both our special library facilities
 # and the system's installed libraries.
 
-LIBS = ../opcodes/libopcodes.a $(BFDLIB) $(LOCAL_LOADLIBES) \
+LIBS = $(OPCODES_LIB) $(BFDLIB) $(LOCAL_LOADLIBES) \
        ../libiberty/libiberty.a
 
 # Specify the directories to be searched for header files.
 # Both . and srcdir are used, in that order,
 # so that tm.h and config.h will be found in the compilation
 # subdirectory rather than in the source directory.
-INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include
+INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/..
 SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config
 
 # Always use -I$(srcdir)/config when compiling.
@@ -214,13 +281,22 @@ SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config
 .NOEXPORT:
 
 # Files to be copied away after each stage in building.
-STAGESTUFF = *.o as.new
+STAGESTUFF = *.o as.new gasp.new
+
+$(OBJS): $(ALL_OBJ_DEPS)
 
 as.new: $(OBJS) $(LIBS)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
 
+gasp.new: gasp.o
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new gasp.o $(LIBS) $(LOADLIBES)
+
+installcheck:
+       @echo No installcheck target is available yet for the GNU assembler.
+
 check:
-       @echo No checks are available yet for the GNU assembler.
+       @(here=`pwd` ; export here ; \
+         cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $(CHECKFLAGS) check)
 
 config.status:
        @echo You must configure gas.  Look at the INSTALL file for details.
@@ -229,25 +305,27 @@ config.status:
 config.h: config-stamp ; @true
 config-stamp: Makefile
        -rm -f config.new config-stamp
-       echo '#define TARGET_CPU       "$(target_cpu)"'        > config.new
+       echo '#ifndef TARGET_CPU'                              > config.new
+       echo '#define TARGET_CPU       "$(target_cpu)"'       >> config.new
        echo '#define TARGET_ALIAS     "$(target_alias)"'     >> config.new
        echo '#define TARGET_CANONICAL "$(target_canonical)"' >> config.new
+       echo '#define GAS_VERSION      "$(VERSION)"'          >> config.new
+       if [ "$(defs)" != "" ]; then \
+         for d in $(defs) ; do \
+           echo "#define $$d"                                >> config.new ; \
+         done ; \
+       else true; fi
+       echo '#endif /* TARGET_CPU */'                        >> config.new
        $(srcdir)/../move-if-change config.new config.h
        touch config-stamp
 
-version.c: vers-stamp ; @true
-vers-stamp: Makefile
-       echo '#include "ansidecl.h"'                        > version.new
-       echo 'CONST char version_string[] = "$(VERSION)";' >> version.new
-       $(srcdir)/../move-if-change version.new version.c
-       touch vers-stamp
-
 # Compiling object files from source files.
 
+gasp.o : gasp.c
 app.o : app.c as.h host.h targ-env.h obj-format.h \
   targ-cpu.h struc-symbol.h \
   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h 
-as.o : as.c as.h host.h targ-env.h obj-format.h \
+as.o : as.c as.h host.h targ-env.h obj-format.h output-file.h \
   targ-cpu.h struc-symbol.h \
   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h subsegs.h \
   tc.h obj.h config.h
@@ -294,7 +372,10 @@ input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \
   input-file.h 
 listing.o : listing.c as.h host.h targ-env.h flonum.h bignum.h \
   listing.h obj-format.h targ-cpu.h struc-symbol.h write.h expr.h \
-  frags.h hash.h read.h symbols.h tc.h obj.h input-file.h
+  frags.h hash.h read.h symbols.h tc.h obj.h input-file.h subsegs.h
+literal.o : literal.c subsegs.h as.h host.h targ-env.h obj-format.h \
+  targ-cpu.h  struc-symbol.h \
+  write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
 messages.o : messages.c as.h host.h targ-env.h obj-format.h \
   targ-cpu.h  struc-symbol.h \
   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
@@ -313,11 +394,20 @@ symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \
   targ-cpu.h  struc-symbol.h \
   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
    subsegs.h 
-version.o : version.c 
 write.o : write.c as.h host.h targ-env.h obj-format.h \
   targ-cpu.h  struc-symbol.h \
   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
   subsegs.h  output-file.h 
+ecoff.o : ecoff.c as.h host.h targ-env.h obj-format.h \
+  targ-cpu.h  struc-symbol.h \
+  write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
+  ecoff.h $(srcdir)/../include/coff/internal.h \
+  $(srcdir)/../include/coff/sym.h $(srcdir)/../include/coff/ecoff.h \
+  $(srcdir)/../include/coff/symconst.h $(srcdir)/../include/aout/stab_gnu.h
+stabs.o : stabs.c as.h host.h targ-env.h obj-format.h \
+  targ-cpu.h  struc-symbol.h \
+  write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
+  subsegs.h $(srcdir)/../include/aout/stab_gnu.h
 xmalloc.o : xmalloc.c
 atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \
   targ-cpu.h struc-symbol.h \
@@ -337,67 +427,79 @@ targ-cpu.o : targ-cpu.c config.h targ-env.h obj-format.h \
 doc: $(srcdir)/as.info
 
 $(srcdir)/as.info: $(srcdir)/doc/as.texinfo
-       @(cd doc; make $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)    
+       @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir) 
 
-clean:
-       @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean)
+clean-here:
        -rm -f $(STAGESTUFF) core
 
+clean mostlyclean: clean-here
+       @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
+       @if [ -d testsuite ] ; then \
+         cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
+       else true; fi
+
 # Like clean but also delete the links made to configure gas.
-distclean: clean
+distclean realclean: clean-here
+       @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
+       @if [ -d testsuite ] ; then \
+         cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
+       else true; fi
        -rm -f config.status Makefile host.h targ-env.h targ-cpu.h \
-               targ-cpu.c obj-format.h obj-format.c atof-targ.c \
-               gas.aux gas.cps gas.fns gas.info gas.kys gas.pgs
-               gas.tps gas.vrs TAGS gas.info* gas.?? gas.??s gas.log \
-               gas.toc gas.*aux *.dvi
+               targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \
+               config-stamp config.h
 
 # Entry points `install', `includes' and `uninstall'.
 
 # Copy the files into directories where they will be run.
 install:
-       -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \
-       if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
-       -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
-       -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
-       if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
-       -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
-       -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \
-       rm -f $(bindir)/$$n; \
-       $(INSTALL_PROGRAM) as.new $(bindir)/$$n; \
-       $(INSTALL_DATA) $(srcdir)/doc/as.1 $(man1dir)/$$n.1; \
+       srcroot=`cd $(srcroot); pwd`; export srcroot; \
+       $(INSTALL_XFORM) as.new $(bindir)/as; \
+       $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
+       n=`t='$(program_transform_name)'; echo as | sed -e "s/brokensed/brokensed/" $$t`; \
        if [ -d $(tooldir) ]; then \
          if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
          rm -f $(tooldir)/bin/as; \
-         ln $(bindir)/$$n $(tooldir)/bin/as \
+         ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
           || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \
        else true; fi
+       srcroot=`cd $(srcroot); pwd`; export srcroot; \
+       $(INSTALL_XFORM) gasp.new $(bindir)/gasp; \
+       n=`t='$(program_transform_name)'; echo gasp | sed -e "s/brokensed/brokensed/" $$t`; \
+       if [ -d $(tooldir) ]; then \
+         if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
+         rm -f $(tooldir)/bin/gasp; \
+         ln $(bindir)/$$n $(tooldir)/bin/gasp >/dev/null 2>/dev/null \
+          || $(INSTALL_PROGRAM) gasp.new $(tooldir)/bin/gasp; \
+       else true; fi
 
 # Cancel installation by deleting the installed files.
 uninstall:
-       -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \
+       -n=`t='$(program_transform_name)'; echo as | sed -e "s/brokensed/brokensed/" $$t`; \
        rm -f $(bindir)/$$n; \
        rm -f $(mandir)/$$n.1
+       -n=`t='$(program_transform_name)'; echo gasp | sed -e "s/brokensed/brokensed/" $$t`; \
+       rm -f $(bindir)/$$n; \
 
 # These exist for maintenance purposes.
 
 tags TAGS: force
        etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
-       
+
 bootstrap: as.new force
        $(MAKE) stage1
-       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
+       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
        $(MAKE) stage2
-       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
+       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
        $(MAKE) comparison against=stage2
 
 bootstrap2: force
-       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
+       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
        $(MAKE) stage2
-       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
+       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
        $(MAKE) comparison against=stage2
 
 bootstrap3: force
-       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
+       $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
        $(MAKE) comparison against=stage2
 
 # Copy the object files from a particular stage into a subdirectory.
@@ -422,19 +524,20 @@ comparison: force
        for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
 
 de-stage1: force
-       - (cd stage1 ; rm as ; mv -f * ..)
+       - (cd stage1 ; rm -f as ; mv -f * ..)
        - rmdir stage1
 
 de-stage2: force
-       - (cd stage2 ; rm as ; mv -f * ..)
+       - (cd stage2 ; rm -f as ; mv -f * ..)
        - rmdir stage2
 
 de-stage3: force
-       - (cd stage3 ; rm as ; mv -f * ..)
+       - (cd stage3 ; rm -f as ; mv -f * ..)
        - rmdir stage3
 
 #In GNU Make, ignore whether `stage*' exists.
-.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
+.PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
+.PHONY: TAGS bootstrap
 
 force:
 
This page took 0.039019 seconds and 4 git commands to generate.