#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 1, or (at your option)
+#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,
# Variables that exist for you to override.
# See below for how to change them for certain systems.
-ALLOCA =
-CFLAGS = -g $(XCFLAGS) -I$(srcdir)/../include
-INTERNAL_CFLAGS = $(CROSS)
-OLDCC = cc
-BISON = bison
-BISONFLAGS = -v
-AR = ar
-OLDAR_FLAGS = qc
-AR_FLAGS = rc
+srcdir = .
+
+prefix = /usr/local
+
+bindir = $(prefix)/bin
+datadir = $(prefix)/lib
+libdir = $(prefix)/lib
+mandir = $(datadir)/man
+man1dir = $(mandir)/man1
+man2dir = $(mandir)/man2
+man3dir = $(mandir)/man3
+man4dir = $(mandir)/man4
+man5dir = $(mandir)/man5
+man6dir = $(mandir)/man6
+man7dir = $(mandir)/man7
+man8dir = $(mandir)/man8
+man9dir = $(mandir)/man9
+infodir = $(prefix)/info
+includedir = $(prefix)/include
+docdir = $(datadir)/doc
+
SHELL = /bin/sh
-# on sysV, define this as cp.
+
INSTALL = install -c
-# These permit overriding just for certain files.
INSTALL_PROGRAM = $(INSTALL)
-INSTALL_FILE = $(INSTALL)
+INSTALL_DATA = $(INSTALL)
-# Define this as & to perform parallel make on a Sequent.
-# Note that this has some bugs, and it seems currently necessary
-# to compile all the gen* files first by hand to avoid erroneous results.
-P =
-
-# How to invoke ranlib.
+AR = ar
+AR_FLAGS = qv
+BISON = bison
+MAKEINFO = makeinfo
RANLIB = ranlib
-# Test to use to see whether ranlib exists on the system.
-RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
-
-# CFLAGS for use with OLDCC, for compiling gnulib.
-# NOTE: -O does not work on some Unix systems!
-CCLIBFLAGS = -O
# Version of ar to use when compiling gnulib.
OLDAR = ar
-version=`awk '{print substr ($$4, 2, length ($$4) - 3); }' $(unsubdir)/../gcc/version.c`
-
-# Directory where sources are, from where we are.
-srcdir = .
-# Common prefix for installation directories.
-# NOTE: This directory must exist when you start installation.
-destdir = /usr/local
-prefix = $(destdir)
-# Directory in which to put the executable for the command `gcc'
-bindir = $(prefix)/bin
-# Directory in which to put the directories used by the compiler.
-libdir = $(prefix)/lib
-# Directory in which the compiler finds executables, libraries, etc.
-libsubdir = $(libdir)/gcc/$(target)/$(version)
-# Number to put in man-page filename.
-manext = 1
-# Directory in which to put man pages.
-mandir = $(prefix)/man/man$(manext)
-
# Additional system libraries to link with.
CLIB=
xmalloc.o \
xrealloc.o
+#### host, target, and site specific Makefile frags come in here.
+
# Definition of `all' is here so that new rules inserted by sed
# do not specify the default target.
# The real definition is under `all.internal'.
all: $(ALL)
+info:
+install-info:
+
+fake-as: force
+ - rm -f ./as.new
+ cp /bin/as ./fake-as
-# sed inserts variable overrides after the following line.
-####
-\f
# Now figure out from those variables how to compile and link.
# This is the variable actually used when we compile.
# How to link with both our special library facilities
# and the system's installed libraries.
-LIBS = $(CLIB) $(unsubdir)/../libiberty`if [ -d $(unsubdir)/libiberty.$(target) ] ; then echo .$(target) ; fi`$(subdir)/libiberty.a
+
+LIBS = $(LOCAL_LOADLIBES) $(CLIB) $(unsubdir)/../libiberty$(subdir)/libiberty.a
# Likewise, for use in the tools that must run on this machine
# even if we are cross-building GCC.
-HOST_LIBS = $(HOST_PREFIX)$(OBSTACK) $(USE_HOST_ALLOCA) $(HOST_PREFIX)$(MALLOC) $(CLIB)
+HOST_LIBS = $(HOST_PREFIX)$(OBSTACK) $(USE_HOST_ALLOCA) $(HOST_PREFIX)$(MALLOC) $(CLIB)
# 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
-SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
+INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include
+SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config
# Always use -I$(srcdir)/config when compiling.
.c.o:
\f
# Remake the info files.
-doc: $(srcdir)/gas.info
+doc: $(srcdir)/as.info
-$(srcdir)/gas.info: $(srcdir)/gas.texinfo
- makeinfo `echo $(srcdir)/gas.texinfo | sed 's,^\./,,'`
+$(srcdir)/as.info: $(srcdir)/doc/as.texinfo
+ (cd doc; make as.info; mv as.info $srcdir)
\f
# Deletion of files made during compilation.
# Copy the files into directories where they will be run.
install: $(ALL)
- $(INSTALL_PROGRAM) $(ALL) $(libsubdir)/as
+ $(INSTALL_PROGRAM) $(ALL) $(bindir)/as
# Create the installation directory.
install-dir:
# These exist for maintenance purposes.
tags TAGS: force
- etags $(REAL_SOURCES) $(REAL_HEADERS) README Makefile config/*.[hc]
+ etags $(REAL_SOURCES) $(REAL_HEADERS) $(srcdir)/README $(srcdir)/Makefile $(srcdir)/config/*.[hc]
bootstrap: $(ALL) force
$(MAKE) stage1
stage1: force
-mkdir stage1
-mv $(STAGESTUFF) stage1
- (cd stage1 ; ln as.new as)
+ if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
stage2: force
-mkdir stage2
-mv $(STAGESTUFF) stage2
- (cd stage2 ; ln as.new as)
+ if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
stage3: force
-mkdir stage3
-mv $(STAGESTUFF) stage3
- (cd stage3 ; ln as.new as)
+ if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
against=stage2