install correct aliases file
[unix-history] / usr / src / old / awk / Makefile
CommitLineData
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#
19CFLAGS= -O
20LIBC= /lib/libc.a
21YFLAGS= -d
22OBJS= awk.lx.o b.o main.o token.o tran.o lib.o run.o parse.o proctab.o \
23 freeze.o
24SRCS= awk.lx.c b.c lib.c main.c parse.c proctab.c freeze.c run.c \
25 token.c tran.c
ec907a08 26MAN= awk.0
6c1d5a5d 27
66456d87 28all: awk
6c1d5a5d 29
66456d87
KB
30awk: ${OBJS} awk.g.o ${LIBC}
31 ${CC} ${CFLAGS} awk.g.o ${OBJS} -lm -o $@
6c1d5a5d 32
66456d87
KB
33y.tab.h: awk.g.o
34
35awk.h: y.tab.h
6c1d5a5d
KM
36 -cmp -s y.tab.h awk.h || cp y.tab.h awk.h
37
66456d87
KB
38token.c: awk.h
39 ex - < tokenscript
6c1d5a5d 40
66456d87
KB
41profile: awk.g.o ${OBJS} mon.o
42 ${CC} -p -i awk.g.o ${OBJS} mon.o -lm
6c1d5a5d 43
66456d87 44proctab.c: proc
f2b49828 45 ./proc > proctab.c
6c1d5a5d 46
32eeaf54 47proc: awk.h proc.o token.o
66456d87 48 ${CC} -o $@ proc.o token.o
6c1d5a5d 49
ec907a08 50clean:
70435bae 51 rm -f *.o core awk awk.h awk.lx.c y.tab.h proc proctab.c yacc* temp
6c1d5a5d 52
ec907a08
KB
53cleandir: clean
54 rm -f ${MAN} tags .depend
55
56depend: y.tab.h ${SRCS}
66456d87 57 mkdep ${CFLAGS} ${SRCS}
6c1d5a5d 58
ec907a08 59install: ${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 63lint: ${SRCS}
66456d87 64 lint ${CFLAGS} ${SRCS}
6c1d5a5d 65
ec907a08 66tags: ${SRCS}
66456d87 67 ctags ${SRCS}