X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2FMakefile.in;h=332e9d812a463947251ed4936d1cf1de35916751;hb=69bb683c6d92c902ab614222712d4716c15e7758;hp=7d91bec84371547eddfa08b2f0ac8402bf8d713f;hpb=d1a9e594859320d99c9ff5730d90dc171594c8e0;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/Makefile.in b/gas/Makefile.in index 7d91bec843..332e9d812a 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -1,130 +1,137 @@ # Makefile for GNU Assembler -# Copyright (C) 1987, 1988, 1990, 1991 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 1, 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. - -# $Id$ +# 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. -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 = . +srcroot = $(srcdir)/.. + +prefix = /usr/local + +program_transform_name = +exec_prefix = $(prefix) +bindir = $(exec_prefix)/bin +libdir = $(exec_prefix)/lib +tooldir = $(libdir)/$(target_alias) + +datadir = $(prefix)/lib +mandir = $(prefix)/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 + +VERSION=cygnus-2.3.1 + 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) -# 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 = +INSTALL = $${srcroot}/install.sh -c +INSTALL_PROGRAM = $(INSTALL) +INSTALL_DATA = $(INSTALL) +INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)' +INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1 -# How to invoke ranlib. +AR = ar +AR_FLAGS = qv +BISON = bison +MAKEINFO = makeinfo +TEXI2DVI = texi2dvi 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=`$(srcdir)/../gcc$(subdir)/gcc -dumpversion` - -# 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= - -# Specify the rule for actually making gnulib. -GNULIB = gnulib.portable - -# Specify the rule for actually making gnulib2. -GNULIB2 = gnulib2.portable - -# List of extra C and assembler files to add to gnulib. -# Assembler files should have names ending in `.asm'. -LIBFUNCS_EXTRA = - -# Program to convert libraries. -LIBCONVERT = - -# Control whether header files are installed. -INSTALL_HEADERS=install-headers - -# Change this to empty to prevent installing limits.h -LIMITS_H = limits.h - -# Directory to link to, when using the target `maketest'. -DIR = ../gcc - -# For better debugging under COFF, define SEPARATE_AUX_OUTPUT in config.h -# and define the following variable as `aux-output2.c' in make-... -AUX_OUTPUT2 = - -# Flags to use when cross-building GCC. -# Prefix to apply to names of object files when using them -# to run on the machine we are compiling on. -HOST_PREFIX= -# Prefix to apply to names of object files when compiling them -# to run on the machine we are compiling on. -# The default for this variable is chosen to keep these rules -# out of the way of the other rules for compiling the same source files. -HOST_PREFIX_1=loser- -HOST_CC=$(CC) -HOST_CFLAGS=$(ALL_CFLAGS) -HOST_LDFLAGS=$(LDFLAGS) -HOST_CPPFLAGS=$(CPPFLAGS) - -# Choose the real default target. -ALL=as - -# End of variables for you to override. +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)" \ + "tooldir=$(tooldir)" \ + "AR=$(AR)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CC=$(CC)" \ + "CFLAGS=$(CFLAGS)" \ + "RANLIB=$(RANLIB)" \ + "LOADLIBES=$(LOADLIBES)" \ + "LDFLAGS=$(LDFLAGS)" \ + "BISON=$(BISON)" \ + "LEX=$(LEX)" \ + "MAKEINFO=$(MAKEINFO)" \ + "INSTALL=$(INSTALL)" \ + "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. @@ -135,7 +142,7 @@ REAL_SOURCES = \ $(srcdir)/bignum-copy.c \ $(srcdir)/cond.c \ $(srcdir)/expr.c \ - $(srcdir)/flonum-const.c \ + $(srcdir)/flonum-konst.c \ $(srcdir)/flonum-copy.c \ $(srcdir)/flonum-mult.c \ $(srcdir)/frags.c \ @@ -143,16 +150,17 @@ 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 \ - $(srcdir)/strstr.c \ $(srcdir)/subsegs.c \ $(srcdir)/symbols.c \ - $(srcdir)/version.c \ $(srcdir)/write.c \ - $(srcdir)/xmalloc.c \ - $(srcdir)/xrealloc.c + $(srcdir)/listing.c \ + $(srcdir)/ecoff.c \ + $(srcdir)/stabs.c \ + $(srcdir)/xmalloc.c # in an expedient order LINKED_SOURCES = \ @@ -170,14 +178,15 @@ REAL_HEADERS = \ $(srcdir)/frags.h \ $(srcdir)/hash.h \ $(srcdir)/input-file.h \ + $(srcdir)/listing.h \ $(srcdir)/tc.h \ $(srcdir)/obj.h \ $(srcdir)/read.h \ $(srcdir)/struc-symbol.h \ $(srcdir)/subsegs.h \ $(srcdir)/symbols.h \ - $(srcdir)/syscalls.h \ - $(srcdir)/write.h + $(srcdir)/write.h \ + $(srcdir)/ecoff.h LINKED_HEADERS = \ a.out.gnu.h \ @@ -190,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 \ @@ -200,7 +211,7 @@ OBJS = \ bignum-copy.o \ cond.o \ expr.o \ - flonum-const.o \ + flonum-konst.o \ flonum-copy.o \ flonum-mult.o \ frags.o \ @@ -208,54 +219,58 @@ OBJS = \ hex-value.o \ input-file.o \ input-scrub.o \ + literal.o \ messages.o \ output-file.o \ read.o \ - strstr.o \ subsegs.o \ symbols.o \ - version.o \ write.o \ + listing.o \ + ecoff.o \ + stabs.o \ xmalloc.o \ - xrealloc.o - -# 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'. + $(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 -all: $(ALL) - -# sed inserts variable overrides after the following line. -#### - # Now figure out from those variables how to compile and link. # This is the variable actually used when we compile. -ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CFLAGS) $(HDEFINES) $(TDEFINES) - -# Even if ALLOCA is set, don't use it if compiling with GCC. -USE_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" ] ; then echo ${ALLOCA}; else true; fi` -USE_HOST_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" ] ; then echo ${HOST_PREFIX}${ALLOCA}; else true; fi` - -# Likewise, for use in the tools that must run on this machine -# even if we are cross-building GCC. -# We don't use USE_ALLOCA because backquote expansion doesn't work in deps. -HOST_LIBDEPS= $(HOST_PREFIX)$(OBSTACK) $(HOST_PREFIX)$(ALLOCA) $(HOST_PREFIX)$(MALLOC) +ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES) # How to link with both our special library facilities # and the system's installed libraries. -LIBS = $(CLIB) $(srcdir)/../libiberty`if [ -d $(srcdir)/libiberty.$(target) ] ; then echo .$(target) ; fi`$(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) +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 -SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config +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. .c.o: @@ -264,43 +279,56 @@ SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config # This tells GNU make version 3 not to export all the variables # defined in this file into the environment. .NOEXPORT: - + # Files to be copied away after each stage in building. -STAGE_GCC=gcc -STAGESTUFF = *.o as - -# The files that "belong" in CONFIG_H are deliberately omitted -# because having them there would not be useful in actual practice. -# All they would do is cause complete recompilation every time -# one of the machine description files is edited. -# That may or may not be what one wants to do. -# If it is, rm *.o is an easy way to do it. -# CONFIG_H = config.h tm.h -CONFIG_H = - -as: $(OBJS) $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as $(OBJS) $(LIBS) $(LOADLIBES) - -objdump: - -all.internal: native -# This is what is made with the host's compiler if making a cross assembler. -native: config.status as +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: + @(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. @false -compilations: ${OBJS} +config.h: config-stamp ; @true +config-stamp: Makefile + -rm -f config.new config-stamp + 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 # 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 tc.h obj.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 atof-generic.o : atof-generic.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 @@ -310,17 +338,17 @@ bignum-copy.o : bignum-copy.c as.h host.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h cond.o : cond.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 \ - + write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h + debug.o : debug.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 expr.o : expr.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 \ - -flonum-const.o : flonum-const.c flonum.h bignum.h + write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h + +flonum-konst.o : flonum-konst.c flonum.h bignum.h flonum-copy.o : flonum-copy.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 @@ -342,19 +370,22 @@ input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.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 \ 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 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 -obstack.o : obstack.c output-file.o : output-file.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 \ output-file.h read.o : read.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 \ - -strstr.o : strstr.c + write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h subsegs.o : subsegs.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 \ @@ -363,13 +394,21 @@ 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 -xrealloc.o : xrealloc.c atof-targ.o : atof-targ.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 \ @@ -377,206 +416,131 @@ atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \ obj-format.o : obj-format.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 -targ-cpu.o : targ-cpu.c targ-env.h obj-format.h \ + subsegs.h symbols.h tc.h obj.h +targ-cpu.o : targ-cpu.c config.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 + symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS) - -# Compile the libraries to be used by gen*. -# If we are not cross-building, gen* use the same .o's that cc1 will use, -# and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict -# with the rules for rtl.o, alloca.o, etc. -$(HOST_PREFIX_1)alloca.o: alloca.c - rm -f $(HOST_PREFIX)alloca.c - cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c - -$(HOST_PREFIX_1)obstack.o: obstack.c - rm -f $(HOST_PREFIX)obstack.c - cp $(srcdir)/obstack.c $(HOST_PREFIX)obstack.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c - -$(HOST_PREFIX_1)malloc.o: malloc.c - rm -f $(HOST_PREFIX)malloc.c - cp $(srcdir)/malloc.c $(HOST_PREFIX)malloc.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c - # 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) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir) - -# Deletion of files made during compilation. -# There are three levels of this: `clean', `cleanconfig' and `realclean'. -# `clean' deletes what you want to delete ordinarily to save space. -# This is most, but not all, of the files made by compilation. -# `cleanconfig' also deletes everything depending -# on the choice of config files. -# `realclean' also deletes everything that could be regenerated automatically. +clean-here: + -rm -f $(STAGESTUFF) core -clean: - -rm -f $(STAGESTUFF) -# Delete the temporary source copies for cross compilation. - -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c - -rm -f $(HOST_PREFIX_1)obstack.c -# Delete the stamp files except stamp-gnulib2. - -rm -f 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. -cleanconfig: clean - -rm -f config.status Makefile host.h targ-env.h - -rm -f targ-cpu.h targ-cpu.c - -rm -f obj-format.h obj-format.c - -rm -f atof-targ.c - -# Get rid of every file that's generated from some other file (except INSTALL). -realclean: cleanconfig - -rm -f gas.aux gas.cps gas.fns gas.info gas.kys gas.pgs gas.tps gas.vrs - -rm -f TAGS - -rm -f gas.info* gas.?? gas.??s gas.log gas.toc gas.*aux - -rm -f *.dvi - +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 TAGS \ + config-stamp config.h + # Entry points `install', `includes' and `uninstall'. # Copy the files into directories where they will be run. -install: as - $(INSTALL_PROGRAM) as $(libsubdir)/as - -# Create the installation directory. -install-dir: - -mkdir $(libdir) - -mkdir $(libdir)/gcc - -mkdir $(libdir)/gcc/$(target) - -mkdir $(libdir)/gcc/$(target)/$(version) - -# Install the compiler executables built during cross compilation. -install-cross: native install-dir - -if [ -f cc1 ] ; then $(INSTALL_PROGRAM) cc1 $(libsubdir)/cc1; else true; fi - -if [ -f cc1plus ] ; then $(INSTALL_PROGRAM) cc1plus $(libsubdir)/cc1plus; else true; fi - $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp - ./gcc -dumpspecs > $(libsubdir)/specs - $(INSTALL_PROGRAM) gcc $(bindir)/gcc - -# Install the man pages. -install-man: install-dir $(srcdir)/gcc.1 protoize.1 unprotoize.1 - $(INSTALL_FILE) $(srcdir)/gcc.1 $(mandir)/gcc.$(manext) - chmod a-x $(mandir)/gcc.$(manext) - $(INSTALL_FILE) $(srcdir)/protoize.1 $(mandir)/protoize.$(manext) - chmod a-x $(mandir)/protoize.$(manext) - $(INSTALL_FILE) $(srcdir)/unprotoize.1 $(mandir)/unprotoize.$(manext) - chmod a-x $(mandir)/unprotoize.$(manext) +install: + 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 >/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: - -rm -rf $(libsubdir) - -rm -rf $(bindir)/as - -rm -rf $(mandir)/gas.$(manext) + -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_SOURCES) $(REAL_HEADERS) README Makefile config/*.[hc] - -bootstrap: as 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 + $(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 - $(MAKE) stage-last + $(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 + $(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 - $(MAKE) stage-last + $(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 - $(MAKE) stage-last + $(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. stage1: force -mkdir stage1 -mv $(STAGESTUFF) stage1 + 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 + 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 + if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi + +against=stage2 + +comparison: force + for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done de-stage1: force - - (cd stage1 ; mv -f * ..) + - (cd stage1 ; rm -f as ; mv -f * ..) - rmdir stage1 de-stage2: force - - (cd stage2 ; mv -f * ..) + - (cd stage2 ; rm -f as ; mv -f * ..) - rmdir stage2 de-stage3: force - - (cd stage3 ; mv -f * ..) + - (cd stage3 ; rm -f as ; mv -f * ..) - rmdir stage3 -stage-last: - for i in *.o; do cmp $$i stage2/$$i; done - -# Copy just the executable files from a particular stage into a subdirectory, -# and delete the object files. Use this if you're just verifying a version -# that is pretty sure to work, and you are short of disk space. -risky-stage1: force - -mkdir stage1 - -mv cc1 cpp cccp gcc stage1 - -rm -f stage1/gnulib - -cp gnulib stage1 && $(RANLIB) stage1/gnulib - -make clean - -risky-stage2: force - -mkdir stage2 - -mv cc1 cpp cccp gcc stage2 - -rm -f stage2/gnulib - -cp gnulib stage2 && $(RANLIB) stage2/gnulib - -make clean - -risky-stage3: force - -mkdir stage3 - -mv cc1 cpp cccp gcc stage3 - -rm -f stage3/gnulib - -cp gnulib stage3 && $(RANLIB) stage3/gnulib - -make clean - -risky-stage4: force - -mkdir stage4 - -mv cc1 cpp cccp gcc stage4 - -rm -f stage4/gnulib - -cp gnulib stage4 && $(RANLIB) stage4/gnulib - -make clean - #In GNU Make, ignore whether `stage*' exists. -.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap -.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4 - -comparison: clean - $(MAKE) "CC=/usr/local/bin/gcc -Wall" as - $(MAKE) stage1 - - $(MAKE) "CC=/usr/local/bin/gcc -Wall -b$(target) -Bstage1/" as -k - $(MAKE) stage2 - - $(MAKE) "CC=/usr/local/bin/gcc -Wall -b$(target)" as -k - $(MAKE) stage-last +.PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean +.PHONY: TAGS bootstrap force: -Makefile: $(srcdir)/Makefile.in $(srcdir)/configure - (cd $(srcdir) ; \ - ./configure +destdir=$(destdir) \ - +norecurse \ - `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \ - $(host) +target=$(target)) - +Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \ + $(srcdir)/configure.in + $(SHELL) ./config.status