Commit | Line | Data |
---|---|---|
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) | |
5 | CFLAGS = -O -DTARGET=VAX -DFAMILY=SCJ -DHERE=VAX -DOUTPUT=BINARY -DPOLISH=POSTFIX | |
6 | FILES = 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 | ||
14 | OBJECTS = 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 | ||
18 | compiler: f77 f77pass1 | |
19 | ||
20 | f77 : driver.o vaxx.o | |
21 | cc -n driver.o vaxx.o -o f77 | |
22 | @size f77 | |
23 | ||
24 | f77pass1 : $(OBJECTS) | |
25 | @echo LOAD | |
26 | @$(CC) $(LDFLAGS) $(OBJECTS) -o f77pass1 | |
27 | @size f77pass1 | |
28 | ||
29 | gram.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 | ||
37 | tokdefs: tokens | |
38 | grep -n . <tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs | |
39 | ||
40 | lex.o : tokdefs | |
41 | driver.o $(OBJECTS) : defs defines locdefs ftypes | |
42 | driver.o : drivedefs | |
43 | ||
44 | locdefs : vaxdefs | |
45 | cp vaxdefs locdefs | |
46 | ||
47 | put.o putscj.o : scjdefs | |
48 | io.o : fio.h | |
49 | scjdefs :: nmanifest ; | |
50 | ||
51 | ||
52 | nmanifest :# /usr/tbl/scj/manifest | |
53 | # @echo "***Warning: /usr/tbl/scj/manifest has changed***" | |
54 | ||
55 | fio.h :# /usr/sif/fort/libI77/fio.h | |
56 | # @echo "***Warning : /usr/sif/fort/libI77/fio.h has changed***" | |
57 | ||
58 | archall: | |
59 | ar rc ../fortarch $(FILES) | |
60 | ||
61 | arch : ../fortarch | |
62 | ||
63 | ../fortarch: $(FILES) | |
64 | @ar uv ../fortarch $? | |
65 | @wc ../fortarch | |
66 | ||
67 | ||
68 | printall: | |
69 | pr $(FILES) | $P | |
70 | touch print | |
71 | ||
72 | print: $(FILES) | |
73 | pr $? | $P | |
74 | touch print | |
75 | ||
76 | lint: | |
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 | ||
82 | cleanup: | |
83 | -rm gram.c *.o f77 f77pass1 | |
84 | du | |
85 | ||
86 | install: /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 | ||
98 | src : $(FILES) vaxdefs | |
99 | cp $? /usr/src/cmd/f77 | |
100 | touch src |