Commit | Line | Data |
---|---|---|
be953a8c KB |
1 | # |
2 | # Copyright (c) 1987 Regents of the University of California. | |
3 | # All rights reserved. The Berkeley software License Agreement | |
4 | # specifies the terms and conditions for redistribution. | |
5 | # | |
6 | # @(#)Makefile 5.1 (Berkeley) %G% | |
7 | # | |
8 | CFLAGS= -O -w | |
9 | LIBC= /lib/libc.a | |
10 | SRCS= addr.c alloc.c blklab.c dcl.c dclgen.c error.c exec.c field.c free.c \ | |
11 | gram.c icfile.c init.c io.c lex.c main.c misc.c mk.c namgen.c pass2.c \ | |
12 | print.c simple.c struct.c symtab.c tailor.c temp.c | |
13 | OBJS= addr.o alloc.o blklab.o dcl.o dclgen.o error.o exec.o field.o free.o \ | |
14 | gram.o icfile.o init.o io.o lex.o main.o misc.o mk.o namgen.o pass2.o \ | |
15 | print.o simple.o struct.o symtab.o tailor.o temp.o | |
16 | ||
17 | all: efl | |
18 | ||
19 | efl: ${OBJS} ${LIBC} | |
20 | ${CC} -o $@ ${CFLAGS} ${OBJS} | |
21 | ||
22 | # gram.c can no longer be made on a pdp11 because of yacc limits | |
23 | gram.c: gram.head gram.dcl gram.expr gram.exec tokdefs | |
24 | (sed < tokdefs "s/#define/%token/" ; \ | |
25 | cat gram.head gram.dcl gram.expr gram.exec) > gram.in | |
26 | ${YACC} ${YFLAGS} gram.in | |
27 | (echo "#define YYDEBUG"; cat y.tab.c) > gram.c | |
28 | rm -f gram.in y.tab.c | |
29 | ||
30 | lex.c: fixuplex | |
31 | lex lex.l | |
32 | sh fixuplex | |
33 | mv lex.yy.c lex.c | |
34 | ||
35 | tokdefs: tokens | |
36 | grep -n . < tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" > tokdefs | |
37 | ||
38 | clean: FRC | |
39 | rm -f ${OBJS} core efl gram.c lex.c tokdefs | |
40 | ||
41 | depend: ${SRCS} FRC | |
42 | mkdep ${CFLAGS} ${SRCS} | |
43 | ||
44 | install: FRC | |
45 | install -s -o bin -g bin -m 755 efl ${DESTDIR}/usr/bin/efl | |
46 | ||
47 | lint: ${SRCS} FRC | |
48 | lint ${CFLAGS} ${SRCS} | |
49 | ||
50 | tags: ${SRCS} FRC | |
51 | ctags ${SRCS} | |
52 | ||
53 | test: | |
54 | ./efl "system=gcos" efltest/Hard.e >z1 2>z2 | |
55 | cmp z1 efltest/Hard.out | |
56 | ./efl "system=gcos" efltest/Band.e >z1 2>z2 | |
57 | cmp z1 efltest/Band.out | |
58 | ./efl "system=gcos" efltest/Buram.e >z1 2>z2 | |
59 | cmp z1 efltest/Buram.out | |
60 | ./efl "system=gcos" efltest/Dgl.e >z1 2>z2 | |
61 | cmp z1 efltest/Dgl.out | |
62 | rm -f z1 z2 | |
63 | @echo TEST OK | |
64 | ||
65 | FRC: | |
66 | ||
67 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
68 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
69 | ||
70 | addr.o: addr.c defs /usr/include/stdio.h | |
71 | alloc.o: alloc.c defs /usr/include/stdio.h | |
72 | blklab.o: blklab.c defs /usr/include/stdio.h | |
73 | dcl.o: dcl.c defs /usr/include/stdio.h | |
74 | dclgen.o: dclgen.c defs /usr/include/stdio.h | |
75 | error.o: error.c defs /usr/include/stdio.h | |
76 | exec.o: exec.c defs /usr/include/stdio.h | |
77 | field.o: field.c defs /usr/include/stdio.h | |
78 | free.o: free.c defs /usr/include/stdio.h | |
79 | gram.o: gram.c defs /usr/include/stdio.h | |
80 | icfile.o: icfile.c defs /usr/include/stdio.h | |
81 | init.o: init.c defs /usr/include/stdio.h tokdefs | |
82 | io.o: io.c /usr/include/ctype.h defs /usr/include/stdio.h | |
83 | lex.o: lex.c /usr/include/stdio.h /usr/include/ctype.h defs | |
84 | lex.o: /usr/include/stdio.h tokdefs | |
85 | main.o: main.c defs /usr/include/stdio.h | |
86 | misc.o: misc.c /usr/include/ctype.h defs /usr/include/stdio.h | |
87 | mk.o: mk.c defs /usr/include/stdio.h | |
88 | namgen.o: namgen.c defs /usr/include/stdio.h | |
89 | pass2.o: pass2.c defs /usr/include/stdio.h /usr/include/ctype.h | |
90 | print.o: print.c defs /usr/include/stdio.h | |
91 | simple.o: simple.c /usr/include/ctype.h defs /usr/include/stdio.h | |
92 | struct.o: struct.c defs /usr/include/stdio.h | |
93 | symtab.o: symtab.c defs /usr/include/stdio.h | |
94 | tailor.o: tailor.c defs /usr/include/stdio.h | |
95 | temp.o: temp.c defs /usr/include/stdio.h | |
96 | ||
97 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |