summaryrefslogtreecommitdiff
path: root/usr.bin/awk/Makefile
blob: 5d817dbcea99cd11cd222ff3a63ccc5c70451b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#	$OpenBSD: Makefile,v 1.17 2020/06/10 21:01:50 millert Exp $

PROG=	awk
SRCS=	ytab.c lex.c b.c main.c parse.c proctab.c tran.c lib.c run.c
LDADD=	-lm
DPADD=	${LIBM}
CLEANFILES+=proctab.c maketab ytab.c ytab.h
CFLAGS+=-I. -I${.CURDIR} -DHAS_ISBLANK -DNDEBUG
HOSTCFLAGS+=-I. -I${.CURDIR} -DHAS_ISBLANK -DNDEBUG

ytab.c ytab.h: awkgram.y
	${YACC} -o ytab.c -d ${.CURDIR}/awkgram.y

BUILDFIRST = ytab.h

proctab.c: maketab
	./maketab ytab.h >proctab.c

maketab: ytab.h maketab.c
	${HOSTCC} ${HOSTCFLAGS} ${.CURDIR}/maketab.c -o $@

.include <bsd.prog.mk>