Bell 32V release
[unix-history] / usr / src / cmd / f77 / Makefile
CommitLineData
01747fe8
TL
1# Makefile for the Fortran 77 command
2# Running on the VAX
3# Generating code for the VAX
4# Using the Johnson C compiler's second pass (binary version)
5COMPFLGS = -O -DTARGET=VAX -DFAMILY=SCJ -DHERE=VAX -DOUTPUT=BINARY -DPOLISH=POSTFIX
6FILES = Makefile defs defines locdefs drivedefs ftypes scjdefs tokens fio.h\
7 driver.c \
8 main.c proc.c init.c\
9 gram.head gram.dcl gram.expr gram.exec gram.io\
10 lex.c equiv.c data.c expr.c exec.c intr.c\
11 io.c misc.c error.c put.c putscjb.c vax.c vaxx.c
12
13
14OBJECTS = main.o init.o proc.o gram.o lex.o \
15 equiv.o data.o expr.o exec.o intr.o io.o misc.o error.o\
16 put.o putscjb.o vax.o vaxx.o
17
18compiler: f77 f77pass1
19
20f77 : driver.o vaxx.o
21 cc -n driver.o vaxx.o -o f77
22 @size f77
23
24f77pass1 : $(OBJECTS)
25 @echo LOAD
26 @$(CC) $(LDFLAGS) $(OBJECTS) -o f77pass1
27 @size f77pass1
28
29gram.c: gram.head gram.dcl gram.expr gram.exec gram.io tokdefs
30 ( sed <tokdefs "s/#define/%token/" ;\
31 cat gram.head gram.dcl gram.expr gram.exec gram.io ) >gram.in
32 $(YACC) $(YFLAGS) gram.in
33 mv y.tab.c gram.c
34 rm gram.in
35
36tokdefs: tokens
37 grep -n . <tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs
38
39lex.o : tokdefs
40driver.o $(OBJECTS) : defs defines locdefs ftypes
41driver.o : drivedefs
42
43locdefs : vaxdefs
44 cp vaxdefs locdefs
45
46put.o putscjb.o : scjdefs
47io.o : fio.h
48scjdefs : nmanifest ;
49
50nmanifest :# /usr/tbl/scj/manifest
51# @echo "***Warning: /usr/tbl/scj/manifest has changed***"
52
53fio.h :# /usr/sif/fort/libI77/fio.h
54# @echo "***Warning : /usr/sif/fort/libI77/fio.h has changed***"
55
56archall:
57 ar rc ../fortarch $(FILES)
58
59arch : ../fortarch
60
61../fortarch: $(FILES)
62 @ar uv ../fortarch $?
63 @wc ../fortarch
64
65
66printall:
67 pr $(FILES) | $P
68 touch print
69
70print: $(FILES)
71 pr $? | $P
72 touch print
73
74lint:
75 @echo "nohup lint -p ... >Lintout&"
76 @nohup lint -p error.c exec.c intr.c expr.c gram.c init.c io.c\
77 lex.c main.c proc.c misc.c put.c putscjb.c vax.c vaxx.c\
78 equiv.c data.c -lS >Lintout&
79
80clean:
81 -rm -f gram.c *.o f77 f77pass1
82 du
83
84install:
85 install -s f77 $(DESTDIR)/usr/bin
86 install -s f77pass1 $(DESTDIR)/usr/lib
87
88src : $(FILES) vaxdefs
89 cp $? /usr/src/cmd/f77
90 touch src
91.c.o :
92 cc -c $(CFLAGS) $(COMPFLGS) $*.c