--- gas/Makefile 2018/04/24 16:38:39 1.1.1.3 +++ gas/Makefile 2018/04/24 16:39:13 1.1.1.4 @@ -20,21 +20,30 @@ # This makefile may be used to make the VAX, 68020, 80386, # SPARC, or ns32k assembler(s). +BINDIR = /usr/local/bin + # If you are on a BSD system, un-comment the next two lines, and comment out # the lines for SystemV and HPUX below -CFLAGS = -g -I. +G0 = -g -I. LDFLAGS = $(CFLAGS) +# # To compile gas on a System Five machine, comment out the two lines above # and un-comment out the next three lines # Comment out the -lPW on the LOADLIBES line if you are using GCC. -# CFLAGS = -g -I. -DUSG +# G0 = -g -I. -DUSG # LDFLAGS = $(CFLAGS) # LOADLIBES = -lmalloc -lPW +# # To compile gas for HPUX, link m-hpux.h to m68k.h , and un-comment the # next two lines. (If you are using GCC, comment out the alloca.o part) # (Get alloca from the emacs distribution, or use GCC.) -# CFLAGS = -g -I. -DUSG +# G0 = -g -I. -DUSG # LOADLIBES = alloca.o +# +# To compile gas for a Sequent Symmetry, comment out all the above lines, +# and un-comment the next two lines. +# G0 = -g -I. -DUSE_SYSTEM_HDR -DEXEC_VERSION=1 +# LOADLIBES = -lc /usr/att/lib/libc.a # If you just want to compile the vax assembler, type 'make avax' @@ -55,18 +64,33 @@ LDFLAGS = $(CFLAGS) # If you machine does not have vfprintf, but does have _doprnt(), # remove the # from the -DNO_VARARGS line below. # +# If the return-type of a signal-hander is void (instead of int), +# remove the # from the -DSIGTY line below. +# # To include the mc68851 mmu coprocessor instructions in the 68020 assembler, # remove the # from the -Dm68851 line below. # # If you want the 80386 assembler to correctly handle fsub/fsubr and fdiv/fdivr # opcodes (unlike most 80386 assemblers), remove the # from # the -DNON_BROKEN_WORDS line below. +# +# To compile 80386 Gas for the Sequent Symmetry, un-comment the -DEXEC_VERSION +# and the -DUSE_SYSTEM_HDR lines below. +# +# To compile gas for the HP 9000/300 un-comment the -DUSE_HP_HDR line below. +# O1 = -DNO_VARARGS O2 = # -DNON_BROKEN_WORDS O3 = # -Dm68851 +O4 = # -DEXEC_VERSION=1 +O5 = # -DSIGTY=void +G4 = # -DUSE_SYSTEM_HDR +G5 = # -DUSE_HP_HDR + +OPTIONS = $(O1) $(O2) $(O3) $(O4) $(O5) -OPTIONS = $(O1) $(O2) $(O3) +CFLAGS = $(G0) $(G4) $(G5) # # To make the 68020 assembler compile as the default, un-comment the next @@ -115,18 +139,18 @@ sparc.o: flonum.h expr.h hash.h md.h wri $(CC) -c $(CFLAGS) -DSPARC sparc.c write-sparc.o: write.c - $(CC) -c -DSPARC $(CFLAGS) $< + $(CC) -c -DSPARC $(CFLAGS) write.c mv write.o write-sparc.o read-sparc.o: read.c - $(CC) -c -DSPARC $(CFLAGS) $< + $(CC) -c -DSPARC $(CFLAGS) read.c mv read.o read-sparc.o asparc: $a $v $(CC) -o asparc $(LDFLAGS) $a $v $(LOADLIBES) # NS32K GAS ------------------------------------------------------------------ -w = ns32k.o atof-ns32k.o write.o read.o +w = ns32k.o atof-ns32k.o write-ns32k.o read-ns32k.o W = ns32k.c atof-ns32k.c ns32k-opcode.h @@ -134,6 +158,14 @@ atof-ns32k.o: flonum.h ns32k.o: as.h frags.h struc-symbol.h flonum.h expr.h md.h hash.h ns32k.o: write.h symbols.h ns32k-opcode.h +write-ns32k.o: write.c + $(CC) -c -DNS32K $(CFLAGS) write.c + mv write.o write-ns32k.o + +read-ns32k.o: + $(CC) -c -DNS32K $(CFLAGS) read.c + mv read.o read-ns32k.o + a32k: $a $w $(CC) -o a32k $(LDFLAGS) $a $w $(LOADLIBES) @@ -144,7 +176,7 @@ X = i386.c atof-i386.c i386.h i386-op i386.o: i386.c as.h read.h flonum.h frags.h struc-symbol.h expr.h i386.o: symbols.h hash.h md.h i386.h i386-opcode.h - $(CC) $(CFLAGS) $(OPTIONS) -c $< + $(CC) $(CFLAGS) $(OPTIONS) -c i386.c atof-i386.o: flonum.h @@ -159,7 +191,7 @@ Y = m68k.c atof-m68k.c m68k-opcode.h m-h atof-m68k.o: flonum.h m68k.o: m68k.c a.out.h as.h expr.h flonum.h frags.h hash.h m68k.o: m68k-opcode.h m68k.h md.h obstack.h struc-symbol.h - $(CC) $(CFLAGS) $(OPTIONS) -c $< + $(CC) $(CFLAGS) $(OPTIONS) -c m68k.c a68: $a $y $(CC) -o a68 $(LDFLAGS) $a $y $(LOADLIBES) @@ -178,17 +210,20 @@ avax: $a $z # global files --------------------------------------------------------------- +as.o: as.c + $(CC) $(CFLAGS) $(OPTIONS) -c as.c + messages.o: messages.c - $(CC) $(CFLAGS) $(OPTIONS) -c $< + $(CC) $(CFLAGS) $(OPTIONS) -c messages.c hash.o: hash.c - $(CC) $(CFLAGS) -Derror=as_fatal -c $< + $(CC) $(CFLAGS) -Derror=as_fatal -c hash.c xmalloc.o: xmalloc.c - $(CC) $(CFLAGS) -Derror=as_fatal -c $< + $(CC) $(CFLAGS) -Derror=as_fatal -c xmalloc.c xrealloc.o: xrealloc.c - $(CC) $(CFLAGS) -Derror=as_fatal -c $< + $(CC) $(CFLAGS) -Derror=as_fatal -c xrealloc.c A =\ as.c xrealloc.c xmalloc.c hash.c hex-value.c \ @@ -205,22 +240,19 @@ frags.h hash.h input-file.h md.h \ obstack.h read.h struc-symbol.h subsegs.h \ symbols.h write.h -gas-dist.tar: COPYING README $A $H $Z $Y $X $W $V Makefile - -rm -r gas-dist - mkdir gas-dist - ln COPYING README $A $H $Z $Y $X $W $V Makefile gas-dist - tar cvhf gas-dist.tar gas-dist - -gas-dist.tar.Z: gas-dist.tar - compress < gas-dist.tar > gas-dist.tar.Z +dist: COPYING README ChangeLog $A $H $Z $Y $X $W $V Makefile + echo gas-`sed -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < version.c` > .fname + mkdir `cat .fname` + + ln COPYING README ChangeLog $A $H $Z $Y $X $W $V Makefile `cat .fname` + tar cvhZf `cat .fname`.tar.Z `cat .fname` + -rm -r `cat .fname` clean: rm -f a avax a68 a386 a32k asparc $a $v $w $x $y $z a core gmon.out bugs a.out -dist: gas-dist.tar gas-dist.tar.Z - install: a - cp a /usr/local/bin/gas + cp a $(BINDIR)/gas # General .o-->.h dependencies