# Makefile for GNU Assembler
-# Copyright (C) 1987-1992 Free Software Foundation, Inc.
+# Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 1997
+# 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, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, 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 = .
+VPATH = @srcdir@
+srcdir = @srcdir@
+srcroot = $(srcdir)/..
-prefix = /usr/local
+target_alias = @target_alias@
+prefix = @prefix@
-bindir = $(prefix)/bin
-datadir = $(prefix)/lib
-libdir = $(prefix)/lib
-mandir = $(datadir)/man
+program_transform_name = @program_transform_name@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+tooldir = $(exec_prefix)/$(target_alias)
+
+datadir = @datadir@
+mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
-infodir = $(datadir)/info
-includedir = $(prefix)/include
-docdir = $(datadir)/doc
+infodir = @infodir@
+includedir = @includedir@
+
+VERSION=cygnus-2.7.1
SHELL = /bin/sh
-INSTALL = install -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL)
+INSTALL = $${srcroot}/install.sh -c
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
+INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
+
+DISTSTUFF= make-gas.com m68k-parse.c itbl-parse.c itbl-lex.c
AR = ar
AR_FLAGS = qv
-BISON = bison
+BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
+BISONFLAGS =
+LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+LEXFLAGS =
MAKEINFO = makeinfo
+TEXI2DVI = texi2dvi
RANLIB = ranlib
-MINUS_G = -g
+CC = @CC@
+HLDFLAGS = @HLDFLAGS@
+HLDENV = @HLDENV@
+RPATH_ENVVAR = @RPATH_ENVVAR@
+CFLAGS = -g
+LDFLAGS =
+
+MAKEOVERRIDES=
+
+EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
+ echo $${rootme}/../expect/expect ; \
+ else echo expect ; 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 = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
+ echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
+ fi`
+RUNTESTFLAGS=
+
+
+# use @target_cpu_type@ for refering to configured target name
+IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
+IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
+IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@
[email protected]
+IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o
# Lists of files for various purposes.
-REAL_SOURCES = \
+SOURCES = \
$(srcdir)/app.c \
$(srcdir)/as.c \
$(srcdir)/atof-generic.c \
$(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 \
$(srcdir)/hash.c \
- $(srcdir)/hex-value.c \
$(srcdir)/input-file.c \
$(srcdir)/input-scrub.c \
+ $(srcdir)/itbl-ops.c \
+ $(srcdir)/literal.c \
$(srcdir)/messages.c \
- $(srcdir)/obstack.c \
$(srcdir)/output-file.c \
$(srcdir)/read.c \
- $(srcdir)/strerror.c \
- $(srcdir)/strstr.c \
$(srcdir)/subsegs.c \
$(srcdir)/symbols.c \
- $(srcdir)/version.c \
$(srcdir)/write.c \
$(srcdir)/listing.c \
- $(srcdir)/xmalloc.c \
- $(srcdir)/xrealloc.c
-
-# in an expedient order
-LINKED_SOURCES = \
- targ-cpu.c \
- obj-format.c \
- atof-targ.c
+ $(srcdir)/ecoff.c \
+ $(srcdir)/stabs.c
-SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
-
-REAL_HEADERS = \
+HEADERS = \
$(srcdir)/as.h \
$(srcdir)/bignum.h \
$(srcdir)/expr.h \
$(srcdir)/frags.h \
$(srcdir)/hash.h \
$(srcdir)/input-file.h \
+ $(srcdir)/itbl-ops.h \
$(srcdir)/listing.h \
$(srcdir)/tc.h \
$(srcdir)/obj.h \
- $(srcdir)/obstack.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 \
- a.out.h \
- host.h \
- targ-env.h \
- targ-cpu.h \
- obj-format.h \
- atof-targ.h
+TE_OBJS=
-HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
+# @target_frag@
OBJS = \
- targ-cpu.o \
- obj-format.o \
- atof-targ.o \
+ $(TARG_CPU_O) \
+ $(OBJ_FORMAT_O) \
+ $(ATOF_TARG_O) \
app.o \
as.o \
atof-generic.o \
bignum-copy.o \
cond.o \
expr.o \
- flonum-const.o \
+ flonum-konst.o \
flonum-copy.o \
flonum-mult.o \
frags.o \
hash.o \
- hex-value.o \
input-file.o \
input-scrub.o \
+ literal.o \
messages.o \
- obstack.o \
output-file.o \
read.o \
- strerror.o \
- strstr.o \
subsegs.o \
symbols.o \
- version.o \
write.o \
listing.o \
- xmalloc.o \
- xrealloc.o
-
-#### host, target, and site specific Makefile frags come in here.
-
-all: as.new
- (cd doc ; $(MAKE) all)
-
-info:
- (cd doc ; $(MAKE) info)
-
-install-info:
- (cd doc ; $(MAKE) install-info)
-
-clean-info:
- (cd doc ; $(MAKE) clean-info)
+ ecoff.o \
+ stabs.o \
+ sb.o \
+ macro.o \
+ @extra_objects@ \
+ $(TE_OBJS)
+
+GASPOBJS = \
+ gasp.o \
+ macro.o \
+ sb.o \
+ hash.o
+
+all: .gdbinit 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) > 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 = $(MINUS_G) $(INTERNAL_CFLAGS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
+ALL_CFLAGS = -D_GNU_SOURCE $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
# How to link with both our special library facilities
# and the system's installed libraries.
-LIBS = $(LOCAL_LOADLIBES) $(CLIB) # ../libiberty/libiberty.a
+LIBDEPS = @OPCODES_DEP@ @BFDDEP@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
+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
-SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config
+INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/.. -I$(srcdir)/../bfd
# Always use -I$(srcdir)/config when compiling.
.c.o:
.NOEXPORT:
# Files to be copied away after each stage in building.
-STAGESTUFF = *.o as.new
+STAGESTUFF = *.o as.new gasp.new
-as.new: $(OBJS) $(LIBDEPS)
- -mv -f as.new as.old
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
+$(OBJS): @ALL_OBJ_DEPS@
-config.status:
- @echo You must configure gas. Look at the INSTALL file for details.
- @false
+as.new: $(OBJS) $(LIBDEPS)
+ $(HLDENV) $(CC) $(HLDFLAGS) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
+
+$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \
+ expr.h struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h \
+ obj.h listing.h bignum.h $(srcdir)/../include/libiberty.h
+
+gasp.new: $(GASPOBJS) ../libiberty/libiberty.a
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new $(GASPOBJS) ../libiberty/libiberty.a $(LOADLIBES)
+
+installcheck:
+ @echo No installcheck target is available yet for the GNU assembler.
+
+site.exp: ./Makefile
+ @echo "Making a new config file..."
+ -@rm -f ./tmp?
+ @touch site.exp
+ -@mv site.exp site.bak
+ @echo "## these variables are automatically generated by make ##" > ./tmp0
+ @echo "# Do not edit here. If you wish to override these values," >> ./tmp0
+ @echo "# do so in the last section." >> ./tmp0
+ @echo set host_os @host_os@ >> ./tmp0
+ @echo set host_alias @host_alias@ >> ./tmp0
+ @echo set host_cpu @host_cpu@ >> ./tmp0
+ @echo set host_vendor @host_vendor@ >> ./tmp0
+ @echo set target_os @target_os@ >> ./tmp0
+ @echo set target_alias @target_alias@ >> ./tmp0
+ @echo set target_cpu @target_cpu@ >> ./tmp0
+ @echo set target_vendor @target_vendor@ >> ./tmp0
+ @echo set host_triplet @host@ >> ./tmp0
+ @echo set target_triplet @target@ >> ./tmp0
+ @echo set target_canonical @target@ >> ./tmp0
+ @echo set srcdir ${srcdir}/testsuite >> ./tmp0
+ @echo set exec_prefix ${exec_prefix} >> ./tmp0
+ @echo set objdir `pwd` >> ./tmp0
+ @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
+ @sed -e '1,/^## All variables above are.*##/ d' < site.bak >> ./tmp0
+ @mv -f ./tmp0 site.exp
+
+check: site.exp
+ if [ -d testsuite ]; then \
+ true; \
+ else \
+ mkdir testsuite; \
+ fi
+ rm -f testsuite/site.exp
+ cp site.exp testsuite/site.exp
+ rootme=`pwd`; export rootme; \
+ srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
+ $(RPATH_ENVVAR)=$$rootme/../bfd:$$rootme/../opcodes:$$$(RPATH_ENVVAR); \
+ export $(RPATH_ENVVAR); \
+ cd testsuite; \
+ EXPECT=${EXPECT} ; export EXPECT ; \
+ if [ -f $${rootme}/../expect/expect ] ; then \
+ TCL_LIBRARY=$${srcdir}/../tcl/library ; \
+ export TCL_LIBRARY ; fi ; \
+ $(RUNTEST) --tool gas --srcdir $${srcdir}/testsuite $(RUNTESTFLAGS)
+
+config.status: configure
+ $(SHELL) config.status --recheck
+
+config.h: config-stamp ; @true
+config-stamp: Makefile conf
+ -rm -f config.new config-stamp
+ echo '/* config.h. Generated automatically by make. */' > config.new
+ echo '#ifndef GAS_VERSION' >> config.new
+ echo '#define GAS_VERSION "$(VERSION)"' >> config.new
+ echo '' >> config.new
+ cat conf >> config.new
+ echo '#endif /* GAS_VERSION */' >> config.new
+ $(srcdir)/../move-if-change config.new config.h
+ touch config-stamp
# Compiling object files from source files.
-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 \
- 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
-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
-bignum-copy.o : bignum-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
-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 \
-
-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
-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
-flonum-mult.o : flonum-mult.c flonum.h bignum.h
-frags.o : frags.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
-hash.o : hash.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
-hex-value.o : hex-value.c
-input-file.o : input-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 input-file.h
-input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.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 \
- 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
-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
-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 \
- subsegs.h
-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
-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 \
- symbols.h tc.h obj.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 \
- 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_DEPENDENTS)
+TARG_CPU_DEP_a29k =
+TARG_CPU_DEP_alpha = $(srcdir)/../include/opcode/alpha.h subsegs.h \
+ $(srcdir)/../include/obstack.h
+# start-sanitize-arc
+TARG_CPU_DEP_arc = $(srcdir)/../include/opcode/arc.h subsegs.h \
+ $(srcdir)/../include/obstack.h
+# end-sanitize-arc
+TARG_CPU_DEP_arm = subsegs.h $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_generic =
+TARG_CPU_DEP_h8300 = $(srcdir)/../include/opcode/h8300.h
+TARG_CPU_DEP_h8500 = $(srcdir)/../opcodes/h8500-opc.h subsegs.h \
+ $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_hppa = subsegs.h $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_i386 = $(srcdir)/../include/opcode/i386.h subsegs.h \
+ $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_i860 =
+TARG_CPU_DEP_i960 =
+TARG_CPU_DEP_m68k = $(srcdir)/../include/opcode/m68k.h \
+ $(srcdir)/config/m68k-parse.h subsegs.h \
+ $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_m88k = $(srcdir)/config/m88k-opcode.h subsegs.h \
+ $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_mips = $(srcdir)/../include/opcode/mips.h subsegs.h \
+ $(srcdir)/../include/obstack.h \
+ $(srcdir)/config/itbl-mips.h $(srcdir)/itbl-ops.h
+TARG_CPU_DEP_ns32k =
+TARG_CPU_DEP_ppc = subsegs.h $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_sh = $(srcdir)/../opcodes/sh-opc.h subsegs.h \
+ $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_sparc = subsegs.h $(srcdir)/../include/opcode/sparc.h \
+ $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_tahoe =
+TARG_CPU_DEP_vax =
+TARG_CPU_DEP_w65 = $(srcdir)/../opcodes/w65-opc.h subsegs.h \
+ $(srcdir)/../include/obstack.h
+TARG_CPU_DEP_z8k = $(srcdir)/../opcodes/z8k-opc.h
+
+# The implicit .c.o rule doesn't work here, perhaps because of the
+# variables, or perhaps because the sources are not on vpath.
+$(TARG_CPU_O): $(TARG_CPU_C) $(TARG_CPU_DEP_@target_cpu_type@)
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(TARG_CPU_C)
+$(OBJ_FORMAT_O): $(OBJ_FORMAT_C)
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(OBJ_FORMAT_C)
+$(ATOF_TARG_O): $(ATOF_TARG_C)
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(ATOF_TARG_C)
+
+gasp.o : gasp.c sb.h macro.h config.h
+sb.o : sb.c sb.h config.h
+macro.o : macro.c macro.h sb.h hash.h config.h
+app.o : app.c write.h
+as.o : as.c output-file.h write.h subsegs.h sb.h macro.h \
+ $(srcdir)/../include/obstack.h
+atof-generic.o : atof-generic.c
+bignum-copy.o : bignum-copy.c
+cond.o : cond.c $(srcdir)/../include/obstack.h
+debug.o : debug.c subsegs.h $(srcdir)/../include/obstack.h
+expr.o : expr.c $(srcdir)/../include/obstack.h
+flonum-konst.o : flonum-konst.c
+flonum-copy.o : flonum-copy.c
+flonum-mult.o : flonum-mult.c
+frags.o : frags.c subsegs.h $(srcdir)/../include/obstack.h
+hash.o : hash.c
+input-file.o : input-file.c input-file.h
+input-scrub.o : input-scrub.c input-file.h sb.h
+listing.o : listing.c input-file.h subsegs.h $(srcdir)/../include/obstack.h
+literal.o : literal.c subsegs.h $(srcdir)/../include/obstack.h
+messages.o : messages.c
+output-file.o : output-file.c output-file.h
+read.o : read.c sb.h macro.h $(srcdir)/../include/obstack.h
+subsegs.o : subsegs.c subsegs.h $(srcdir)/../include/obstack.h
+symbols.o : symbols.c subsegs.h $(srcdir)/../include/obstack.h
+write.o : write.c subsegs.h output-file.h $(srcdir)/../include/obstack.h
+ecoff.o : ecoff.c 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 subsegs.h $(srcdir)/../include/aout/stab_gnu.h \
+ $(srcdir)/../include/obstack.h
+
+obj-elf.o : $(srcdir)/config/obj-elf.c
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-elf.c
+obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-ecoff.c
+obj-coff.o: $(srcdir)/config/obj-coff.c
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-coff.c
+
+e-mipself.o : $(srcdir)/config/e-mipself.c
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipself.c
+e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipsecoff.c
+e-i386coff.o: $(srcdir)/config/e-i386coff.c
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386coff.c
+e-i386elf.o: $(srcdir)/config/e-i386elf.c
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386elf.c
+
+# The m68k operand parser.
+
+# Depend upon itbl-parse.c to serialize a parallel make.
+m68k-parse.c: $(srcdir)/config/m68k-parse.y itbl-parse.c
+ $(BISON) $(BISONFLAGS) $(srcdir)/config/m68k-parse.y
+ mv -f y.tab.c m68k-parse.c
+m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
+
+# The instruction table specification lexical analyzer and parser.
+
+itbl-parse.h : $(srcdir)/itbl-parse.y
+itbl-parse.c : $(srcdir)/itbl-parse.y
+itbl-lex.c : $(srcdir)/itbl-lex.l
+
+itbl-lex.c: $(srcdir)/itbl-lex.l
+ $(LEX) $(LEXFLAGS) $(srcdir)/itbl-lex.l
+ mv -f lex.yy.c itbl-lex.c
+
+itbl-lex.o: itbl-lex.c itbl-parse.h
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) itbl-lex.c
+
+itbl-parse.c: $(srcdir)/itbl-parse.y
+ $(BISON) -d $(BISONFLAGS) $(srcdir)/itbl-parse.y
+ mv -f y.tab.c itbl-parse.c
+ mv -f y.tab.h itbl-parse.h
+
+itbl-parse.h: itbl-parse.c
+
+itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) itbl-parse.c
+
+itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
+ $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/itbl-ops.c
+
+# stand-alone itbl assembler & disassembler
+itbl-test-ops.o: $(srcdir)/itbl-ops.c \
+ $(srcdir)/itbl-ops.h itbl-parse.h
+ $(CC) -o itbl-test-ops.o -DSTAND_ALONE -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/itbl-ops.c
+
+itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c $(srcdir)/itbl-ops.h
+ $(CC) -c -DSTAND_ALONE $(ALL_CFLAGS) $(INCLUDES)\
+ $(srcdir)/testsuite/gas/all/itbl-test.c
+
+IT_TEST_OBJS= itbl-parse.o itbl-lex.o itbl-test-ops.o
+itbl-test: $(IT_TEST_OBJS) itbl-test.o $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o itbl-test itbl-test.o $(IT_TEST_OBJS) $(LIBS)
# Remake the info files.
doc: $(srcdir)/as.info
$(srcdir)/as.info: $(srcdir)/doc/as.texinfo
- (cd doc; make as.info; mv as.info $srcdir)
+ @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
+
+diststuff: $(DISTSTUFF) info
-clean:
- (cd doc ; $(MAKE) clean)
- -rm -f $(STAGESTUFF) core
+clean-here:
+ -rm -f $(STAGESTUFF) core stamp-mk.com
+ -rm -f testsuite/*.o testsuite/*.out \
+ testsuite/gas.log testsuite/gas.sum testsuite/site.exp
+
+clean mostlyclean: clean-here
+ @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
# Like clean but also delete the links made to configure gas.
-distclean: clean
- -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
+
+DISTCLEAN_HERE = config.status Makefile targ-env.h targ-cpu.h obj-format.h \
+ TAGS itbl-cpu.h \
+ config-stamp config.h conf config.log config.cache .gdbinit \
+ testsuite/Makefile testsuite/config.status
+
+distclean: clean-here
+ @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
+ -rm -f $(DISTCLEAN_HERE)
+
+maintainer-clean realclean: clean-here
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
+ -rm -rf $(DISTCLEAN_HERE) $(DISTSTUFF)
# Entry points `install', `includes' and `uninstall'.
# Copy the files into directories where they will be run.
install:
- if [ "$(host_alias)" = "$(target_alias)" ] ; then \
- $(INSTALL_PROGRAM) as.new $(bindir)/as ; \
- else \
- $(INSTALL_PROGRAM) as.new $(bindir)/as-$(target_alias) ; \
- fi
-
-# Create the installation directory.
-install-dir:
- -mkdir $(libdir)
- -mkdir $(libdir)/gcc
- -mkdir $(libdir)/gcc/$(target)
- -mkdir $(libdir)/gcc/$(target)/$(version)
+ srcroot=`cd $(srcroot); pwd`; export srcroot; \
+ $(INSTALL_XFORM) as.new $(bindir)/as; \
+ $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
+ test -d $(tooldir) || mkdir $(tooldir); \
+ test -d $(tooldir)/bin || mkdir $(tooldir)/bin; \
+ n=`echo as | sed '$(program_transform_name)'`; \
+ rm -f $(tooldir)/bin/as; \
+ ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
+ || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as
+ srcroot=`cd $(srcroot); pwd`; export srcroot; \
+ $(INSTALL_XFORM) gasp.new $(bindir)/gasp
# 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 $$t`; \
+ rm -f $(bindir)/$$n; \
+ rm -f $(mandir)/$$n.1
+ -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
+ rm -f $(bindir)/$$n; \
# These exist for maintenance purposes.
tags TAGS: force
- etags $(REAL_SOURCES) $(REAL_HEADERS) $(srcdir)/README $(srcdir)/Makefile $(srcdir)/config/*.[hc]
-
+ 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
+ rm -f stage && ln -s stage1 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
$(MAKE) stage2
- $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
+ rm -f stage && ln -s stage2 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(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
+ rm -f stage && ln -s stage1 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
$(MAKE) stage2
- $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
+ rm -f stage && ln -s stage2 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(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
+ rm -f stage && ln -s stage2 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
$(MAKE) comparison against=stage2
# Copy the object files from a particular stage into a subdirectory.
against=stage2
+# This rule is derived from corresponding code in the Makefile.in for gcc.
+# The "tail +16c" is to bypass headers which may include timestamps or
+# temporary assembly file names.
comparison: force
- for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
+ x=0 ; \
+ for file in *.o ; do \
+ tail +16c ./$$file > tmp-foo1; \
+ if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
+ if cmp tmp-foo1 tmp-foo2 ; then \
+ true ; \
+ else \
+ echo $$file differs ; \
+ x=1 ; \
+ fi ; \
+ else true; fi ; \
+ done ; \
+ exit $$x
+ -rm -f tmp-foo*
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:
-Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
+Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
+ $(srcdir)/configure.in config.status conf.in
+ $(SHELL) ./config.status
+.gdbinit: $(srcdir)/gdbinit.in config.status
$(SHELL) ./config.status
-