BSD 3 development
[unix-history] / usr / src / cmd / f77 / omakefile
CommitLineData
663621db
BJ
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)
5CFLAGS = -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 putscj.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 putscj.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 @echo "expect 4 shift/reduce"
34 mv y.tab.c gram.c
35 rm gram.in
36
37tokdefs: tokens
38 grep -n . <tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs
39
40lex.o : tokdefs
41driver.o $(OBJECTS) : defs defines locdefs ftypes
42driver.o : drivedefs
43
44locdefs : vaxdefs
45 cp vaxdefs locdefs
46
47put.o putscj.o : scjdefs
48io.o : fio.h
49scjdefs :: nmanifest ;
50
51
52nmanifest :# /usr/tbl/scj/manifest
53# @echo "***Warning: /usr/tbl/scj/manifest has changed***"
54
55fio.h :# /usr/sif/fort/libI77/fio.h
56# @echo "***Warning : /usr/sif/fort/libI77/fio.h has changed***"
57
58archall:
59 ar rc ../fortarch $(FILES)
60
61arch : ../fortarch
62
63../fortarch: $(FILES)
64 @ar uv ../fortarch $?
65 @wc ../fortarch
66
67
68printall:
69 pr $(FILES) | $P
70 touch print
71
72print: $(FILES)
73 pr $? | $P
74 touch print
75
76lint:
77 @echo "nohup lint -p ... >Lintout&"
78 @nohup lint -p error.c exec.c intr.c expr.c gram.c init.c io.c\
79 lex.c main.c proc.c misc.c put.c putscj.c vax.c vaxx.c\
80 equiv.c data.c -lS >Lintout&
81
82cleanup:
83 -rm gram.c *.o f77 f77pass1
84 du
85
86install: /usr/bin/f77 /usr/lib/f77pass1
87
88/usr/bin/f77 : f77
89 strip f77
90 @size f77 /usr/bin/f77
91 cp f77 /usr/bin/f77
92
93/usr/lib/f77pass1 : f77pass1
94 strip f77pass1
95 @size f77pass1 /usr/lib/f77pass1
96 cp f77pass1 /usr/lib/f77pass1
97
98src : $(FILES) vaxdefs
99 cp $? /usr/src/cmd/f77
100 touch src