+# Makefile for the Fortran 77 command
+# Running on the VAX
+# Generating code for the VAX
+# Using the Johnson C compiler's second pass (binary version)
+COMPFLGS = -O -DTARGET=VAX -DFAMILY=SCJ -DHERE=VAX -DOUTPUT=BINARY -DPOLISH=POSTFIX
+FILES = Makefile defs defines locdefs drivedefs ftypes scjdefs tokens fio.h\
+ driver.c \
+ main.c proc.c init.c\
+ gram.head gram.dcl gram.expr gram.exec gram.io\
+ lex.c equiv.c data.c expr.c exec.c intr.c\
+ io.c misc.c error.c put.c putscjb.c vax.c vaxx.c
+
+
+OBJECTS = main.o init.o proc.o gram.o lex.o \
+ equiv.o data.o expr.o exec.o intr.o io.o misc.o error.o\
+ put.o putscjb.o vax.o vaxx.o
+
+compiler: f77 f77pass1
+
+f77 : driver.o vaxx.o
+ cc -n driver.o vaxx.o -o f77
+ @size f77
+
+f77pass1 : $(OBJECTS)
+ @echo LOAD
+ @$(CC) $(LDFLAGS) $(OBJECTS) -o f77pass1
+ @size f77pass1
+
+gram.c: gram.head gram.dcl gram.expr gram.exec gram.io tokdefs
+ ( sed <tokdefs "s/#define/%token/" ;\
+ cat gram.head gram.dcl gram.expr gram.exec gram.io ) >gram.in
+ $(YACC) $(YFLAGS) gram.in
+ mv y.tab.c gram.c
+ rm gram.in
+
+tokdefs: tokens
+ grep -n . <tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs
+
+lex.o : tokdefs
+driver.o $(OBJECTS) : defs defines locdefs ftypes
+driver.o : drivedefs
+
+locdefs : vaxdefs
+ cp vaxdefs locdefs
+
+put.o putscjb.o : scjdefs
+io.o : fio.h
+scjdefs : nmanifest ;
+
+nmanifest :# /usr/tbl/scj/manifest
+# @echo "***Warning: /usr/tbl/scj/manifest has changed***"
+
+fio.h :# /usr/sif/fort/libI77/fio.h
+# @echo "***Warning : /usr/sif/fort/libI77/fio.h has changed***"
+
+archall:
+ ar rc ../fortarch $(FILES)
+
+arch : ../fortarch
+
+../fortarch: $(FILES)
+ @ar uv ../fortarch $?
+ @wc ../fortarch
+
+
+printall:
+ pr $(FILES) | $P
+ touch print
+
+print: $(FILES)
+ pr $? | $P
+ touch print
+
+lint:
+ @echo "nohup lint -p ... >Lintout&"
+ @nohup lint -p error.c exec.c intr.c expr.c gram.c init.c io.c\
+ lex.c main.c proc.c misc.c put.c putscjb.c vax.c vaxx.c\
+ equiv.c data.c -lS >Lintout&
+
+clean:
+ -rm -f gram.c *.o f77 f77pass1
+ du
+
+install:
+ install -s f77 $(DESTDIR)/usr/bin
+ install -s f77pass1 $(DESTDIR)/usr/lib
+
+src : $(FILES) vaxdefs
+ cp $? /usr/src/cmd/f77
+ touch src
+.c.o :
+ cc -c $(CFLAGS) $(COMPFLGS) $*.c