# 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.
includedir = $(prefix)/include
docdir = $(datadir)/doc
-VERSION=cygnus-2.2.1
+VERSION=cygnus-2.3.1
SHELL = /bin/sh
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(CC); \
else \
- t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
+ t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
fi; \
fi`
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(NM); \
else \
- t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
+ t='$(program_transform_name)'; echo nm | sed -e 's/brokensed/brokensed/' $$t ; \
fi; \
fi`
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(OBJDUMP); \
else \
- t='$(program_transform_name)'; echo objdump | sed -e '' $$t ; \
+ t='$(program_transform_name)'; echo objdump | sed -e 's/brokensed/brokensed/' $$t ; \
fi; \
fi`
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"OBJDUMP_FOR_TARGET=$(OBJDUMP_FOR_TARGET)" \
- "RUNTEST_FLAGS=$(RUNTEST_FLAGS)" \
+ "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"RUNTEST=$(RUNTEST)"
# Lists of files for various purposes.
HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
+#### host, target, and site specific Makefile frags come in here.
+
OBJS = \
targ-cpu.o \
obj-format.o \
listing.o \
ecoff.o \
stabs.o \
- xmalloc.o
-
-#### host, target, and site specific Makefile frags come in here.
-
-all: as.new
+ 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)
@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.
.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: as.new
+check:
@(here=`pwd` ; export here ; \
cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $(CHECKFLAGS) check)
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
# 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
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
clean-here:
-rm -f $(STAGESTUFF) core
-clean: clean-here
- @cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean
+clean mostlyclean: clean-here
+ @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
@if [ -d testsuite ] ; then \
- cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) clean ; \
+ cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
else true; fi
# Like clean but also delete the links made to configure gas.
-distclean: clean-here
- @cd doc ; $(MAKE) $(FLAGS_TO_PASS) distclean
+distclean realclean: clean-here
+ @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
@if [ -d testsuite ] ; then \
- cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) distclean ; \
+ 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 \
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 "" $$t`; \
+ 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.
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: