Commit | Line | Data |
---|---|---|
6c1d5a5d | 1 | # |
ec907a08 KB |
2 | # Copyright (c) 1987 The Regents of the University of California. |
3 | # All rights reserved. | |
66456d87 | 4 | # |
ec907a08 KB |
5 | # Redistribution and use in source and binary forms are permitted |
6 | # provided that the above copyright notice and this paragraph are | |
7 | # duplicated in all such forms and that any documentation, | |
8 | # advertising materials, and other materials related to such | |
9 | # distribution and use acknowledge that the software was developed | |
10 | # by the University of California, Berkeley. The name of the | |
11 | # University may not be used to endorse or promote products derived | |
12 | # from this software without specific prior written permission. | |
13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
16 | # | |
17 | # @(#)Makefile 4.9 (Berkeley) %G% | |
66456d87 KB |
18 | # |
19 | CFLAGS= -O | |
20 | LIBC= /lib/libc.a | |
21 | YFLAGS= -d | |
22 | OBJS= awk.lx.o b.o main.o token.o tran.o lib.o run.o parse.o proctab.o \ | |
23 | freeze.o | |
24 | SRCS= awk.lx.c b.c lib.c main.c parse.c proctab.c freeze.c run.c \ | |
25 | token.c tran.c | |
ec907a08 | 26 | MAN= awk.0 |
6c1d5a5d | 27 | |
66456d87 | 28 | all: awk |
6c1d5a5d | 29 | |
66456d87 KB |
30 | awk: ${OBJS} awk.g.o ${LIBC} |
31 | ${CC} ${CFLAGS} awk.g.o ${OBJS} -lm -o $@ | |
6c1d5a5d | 32 | |
66456d87 KB |
33 | y.tab.h: awk.g.o |
34 | ||
35 | awk.h: y.tab.h | |
6c1d5a5d KM |
36 | -cmp -s y.tab.h awk.h || cp y.tab.h awk.h |
37 | ||
66456d87 KB |
38 | token.c: awk.h |
39 | ex - < tokenscript | |
6c1d5a5d | 40 | |
66456d87 KB |
41 | profile: awk.g.o ${OBJS} mon.o |
42 | ${CC} -p -i awk.g.o ${OBJS} mon.o -lm | |
6c1d5a5d | 43 | |
66456d87 | 44 | proctab.c: proc |
f2b49828 | 45 | ./proc > proctab.c |
6c1d5a5d | 46 | |
32eeaf54 | 47 | proc: awk.h proc.o token.o |
66456d87 | 48 | ${CC} -o $@ proc.o token.o |
6c1d5a5d | 49 | |
ec907a08 | 50 | clean: |
70435bae | 51 | rm -f *.o core awk awk.h awk.lx.c y.tab.h proc proctab.c yacc* temp |
6c1d5a5d | 52 | |
ec907a08 KB |
53 | cleandir: clean |
54 | rm -f ${MAN} tags .depend | |
55 | ||
56 | depend: y.tab.h ${SRCS} | |
66456d87 | 57 | mkdep ${CFLAGS} ${SRCS} |
6c1d5a5d | 58 | |
ec907a08 | 59 | install: ${MAN} |
66456d87 | 60 | install -s -o bin -g bin -m 755 awk ${DESTDIR}/bin/awk |
ec907a08 | 61 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 |
66da2b0f | 62 | |
ec907a08 | 63 | lint: ${SRCS} |
66456d87 | 64 | lint ${CFLAGS} ${SRCS} |
6c1d5a5d | 65 | |
ec907a08 | 66 | tags: ${SRCS} |
66456d87 | 67 | ctags ${SRCS} |