* mpw-config.in: Parse target and use to generate forward includes
authorStan Shebs <shebs@codesourcery.com>
Sun, 26 Jun 1994 23:51:45 +0000 (23:51 +0000)
committerStan Shebs <shebs@codesourcery.com>
Sun, 26 Jun 1994 23:51:45 +0000 (23:51 +0000)
to tc-, obj-, and atof- files, use te-generic.h for emulation.
* mpw-make.in (VERSION): Define.
(as.c): Compile with GCC.
(TARG_OBJECTS, CLIBS): Define.
(as.new): Use LDFLAGS, TARG_OBJECTS, CLIBS and EXTRALIBS in link
command.
(config.h, config-stamp): Build.
config/ho-mpw.h (HOST_SPECIAL_INIT): Define.

gas/ChangeLog.mpw
gas/config/ho-mpw.h
gas/mpw-config.in
gas/mpw-make.in

index 378b58f14ee0074a53831f6d97725e9d10a50e71..740035e92cd87f8809bf8c943255eadb3d3d0c8a 100644 (file)
@@ -1,3 +1,15 @@
+Sun Jun 26 16:42:12 1994  Stan Shebs  (shebs@andros.cygnus.com)
+
+       * mpw-config.in: Parse target and use to generate forward includes
+       to tc-, obj-, and atof- files, use te-generic.h for emulation.
+       * mpw-make.in (VERSION): Define.
+       (as.c): Compile with GCC.
+       (TARG_OBJECTS, CLIBS): Define.
+       (as.new): Use LDFLAGS, TARG_OBJECTS, CLIBS and EXTRALIBS in link
+       command.
+       (config.h, config-stamp): Build.
+       config/ho-mpw.h (HOST_SPECIAL_INIT): Define.
+
 Sun Jun 12 16:38:42 1994  Stan Shebs  (shebs@andros.cygnus.com)
 
        * mpw-make.in (C, CFLAGS): Removed definitions.
index e498df6cc516002cccfdbe57effe941bdd895415..76ec64963b9dea9587a859a9fa4fd7e9195dec10 100644 (file)
@@ -75,4 +75,9 @@ FILE *mpw_fopen();
 
 #define LOSING_COMPILER
 
+/* Arrange for the debugger hook to be checked right when the assembler
+   starts up. */
+
+#define HOST_SPECIAL_INIT(argc,argv)  mpw_special_init ((argv)[0]);
+
 /* end of ho-mpw.h */
index 1467c49afa98abc7684f59c064c6c963a6567972..52506b8132f255ab7d551af32cd28364fd2de985 100644 (file)
@@ -1,3 +1,30 @@
 # Configuration fragment for GAS.
 
 forward-include {srcdir}config:ho-mpw.h host.h 
+
+Set target_arch `echo {target_canonical} | sed -e 's/-.*-.*//'`
+
+# (should canonicalize arch name) */
+
+Set target_format `echo {target_canonical} | sed -e 's/.*-.*-//'`
+
+forward-include "{srcdir}"config:tc-{target_arch}.c targ-cpu.c
+forward-include "{srcdir}"config:tc-{target_arch}.h targ-cpu.h
+
+forward-include "{srcdir}"config:obj-{target_format}.c obj-format.c
+forward-include "{srcdir}"config:obj-{target_format}.h obj-format.h
+
+# Default emulation.
+
+forward-include "{srcdir}"config:te-generic.h targ-env.h
+
+If "{target_arch}" =~ /ns32k/
+       forward-include "{srcdir}"config:atof-ns32k.c atof-targ.c
+Else If "{target_arch}" =~ /tahoe/
+       forward-include "{srcdir}"config:atof-tahoe.c atof-targ.c
+Else If "{target_arch}" =~ /vax/
+       forward-include "{srcdir}"config:atof-vax.c atof-targ.c
+Else
+       # Use IEEE by default.
+       forward-include "{srcdir}"config:atof-ieee.c atof-targ.c
+End If
index f6eaafd84925208921ff73e353e7774cd80155ca..3b051d866255ac73d3368b6941234499d0c94220 100644 (file)
@@ -1,5 +1,9 @@
 # Makefile fragment for GAS.
 
+VERSION = cygnus-2.3.1
+
+gC = gC1
+
 s = "{srcdir}"
 
 o = :
@@ -16,13 +20,16 @@ ALL_CFLAGS = {CFLAGS} {CROSS} -d TARGET_BYTES_BIG_ENDIAN -d BFD_ASSEMBLER -i "{t
 .c.o  \Option-f .c
    {CC}  {DepDir}{Default}.c {ALL_CFLAGS} -s gas_{Default} -o {TargDir}{Default}.c.o
 
+.gc.o  \Option-f .c
+   {gC}  {DepDir}{Default}.c {ALL_CFLAGS} -s gas_{Default} -o {TargDir}{Default}.gc.o
+
 prefix = usr:local:
 
 bindir = {prefix}bin:
 
 OBJECTS = \Option-d
                "{o}"app.c.o \Option-d
-               "{o}"as.c.o \Option-d
+               "{o}"as.gc.o \Option-d
                "{o}"atof-generic.c.o \Option-d
                "{o}"bignum-copy.c.o \Option-d
                "{o}"cond.c.o \Option-d
@@ -46,36 +53,48 @@ OBJECTS = \Option-d
                "{o}"ecoff.c.o \Option-d
                "{o}"xmalloc.c.o \Option-d
 
+TARG_OBJECTS =  "{o}"obj-format.c.o "{o}"targ-cpu.c.o "{o}"atof-targ.c.o
+
+# If you put config.h in INCLUDES, then MPW's stupid make will always
+# want to rebuild everything.  Better to do in two stages.
+
 INCLUDES =
+# "{o}"config.h
 # host.h
 #"{s}".h
 
+CLIBS = ::libiberty:libiberty.o        ::bfd:libbfd.o ::opcodes:libopcodes.o
+
 all \Option-f as.new
 
-as.new \Option-f\Option-f {OBJECTS} "{o}"obj-format.c.o "{o}"targ-cpu.c.o "{o}"atof-targ.c.o \Option-d
-               ::libiberty:libiberty.o \Option-d
-               ::bfd:libbfd.o \Option-d
-               ::opcodes:libopcodes.o
-       Link -d -model far -c 'MPS ' -t MPST \Option-d
-               {OBJECTS} \Option-d
-               "{o}"obj-format.c.o "{o}"targ-cpu.c.o "{o}"atof-targ.c.o \Option-d
-               ::libiberty:libiberty.o \Option-d
-               ::bfd:libbfd.o \Option-d
-               ::opcodes:libopcodes.o \Option-d
-               #"{CLibraries}"CSANELib.o \Option-d
-               #"{CLibraries}"Math.o \Option-d
-               #"{CLibraries}"Complex.o \Option-d
-               "{CLibraries}"StdClib.o \Option-d
-               "{Libraries}"Stubs.o \Option-d
-               "{Libraries}"Runtime.o \Option-d
-               "{Libraries}"Interface.o \Option-d
-               #"{Libraries}"ToolLibs.o \Option-d
-               -o as.new
+as.new \Option-f\Option-f {OBJECTS} {TARG_OBJECTS} {CLIBS}
+       Link {LDFLAGS} -o as.new {OBJECTS} {TARG_OBJECTS} {CLIBS} {EXTRALIBS}
+
+
+"{o}"config.h \Option-f "{o}"config-stamp
+
+"{o}"config-stamp \Option-f Makefile
+       Delete -i -y "{o}"config.new "{o}"config-stamp
+       echo '#ifndef TARGET_CPU'                              > "{o}"config.new
+       echo '#define TARGET_CPU       "{target_cpu}"'        >> "{o}"config.new
+       echo '#define TARGET_ALIAS     "{target_alias}"'      >> "{o}"config.new
+       echo '#define TARGET_CANONICAL "{target_canonical}"'  >> "{o}"config.new
+       echo '#define GAS_VERSION      "{VERSION}"'           >> "{o}"config.new
+#      if [ "$(defs)" != "" ]; then \
+#        for d in .. $(defs) ; do \
+#          if [ "$$d" != ".." ]; then \
+#            echo "#define $$d"                              >> "{o}"config.new ; \
+#          else true; fi; \
+#        done ; \
+#      else true; fi
+       echo '#endif /* TARGET_CPU */'                        >> "{o}"config.new
+       MoveIfChange "{o}"config.new "{o}"config.h
+       Echo ' ' "{o}"config-stamp
 
 "{o}"app.c.o \Option-f "{s}"app.c {INCLUDES}
-"{o}"as.c.o \Option-f "{s}"as.c {INCLUDES}
+"{o}"as.gc.o \Option-f "{s}"as.c {INCLUDES}
 "{o}"atof-generic.c.o \Option-f "{s}"atof-generic.c {INCLUDES}
-"{o}"bifnum-copy.c.o \Option-f "{s}"bignum-copy.c {INCLUDES}
+"{o}"bignum-copy.c.o \Option-f "{s}"bignum-copy.c {INCLUDES}
 "{o}"cond.c.o \Option-f "{s}"cond.c {INCLUDES}
 "{o}"expr.c.o \Option-f "{s}"expr.c {INCLUDES}
 "{o}"flonum-konst.c.o \Option-f "{s}"flonum-konst.c {INCLUDES}
@@ -96,6 +115,10 @@ as.new \Option-f\Option-f {OBJECTS} "{o}"obj-format.c.o "{o}"targ-cpu.c.o "{o}"a
 "{o}"ecoff.c.o \Option-f "{s}"ecoff.c {INCLUDES}
 "{o}"xmalloc.c.o \Option-f "{s}"xmalloc.c {INCLUDES}
 
+"{o}"targ-cpu.c.o \Option-f "{o}"targ-cpu.c {INCLUDES}
+"{o}"obj-format.c.o \Option-f "{o}"obj-format.c {INCLUDES}
+"{o}"atof-targ.c.o \Option-f "{o}"atof-targ.c {INCLUDES}
+
 install \Option-f
        If "`Exists "{prefix}"`" == ""
                Echo "{prefix}" does not exist, cannot install anything