1#	$NetBSD: Makefile,v 1.7 2011/08/09 13:06:31 joerg Exp $
2
3WARNS?= 4
4CWARNFLAGS.clang+=	-Wno-self-assign
5
6.include <bsd.own.mk>
7
8BINDIR?= /usr/bin
9DIST=	${.CURDIR}/../dist
10.PATH:	${DIST}
11
12PROG=	awk
13SRCS=	awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c
14CPPFLAGS+=	-I${DIST} -I.
15LDADD+=	-lm
16.if !defined(HOSTPROG)
17DPADD+=	${LIBM}
18.endif
19YHEADER=	yes
20.if defined(HAVE_GCC) || defined(HAVE_PCC)
21COPTS+=	-Wno-pointer-sign
22.endif
23COPTS.run.c += -Wno-format-nonliteral
24COPTS.tran.c += -Wno-format-nonliteral
25
26# info file originally from GNU awk 3.1.3, adjusted for nawk slightly
27.PATH:	${NETBSDSRCDIR}/external/gpl2/gawk/dist
28TEXINFO=        awk.info
29
30# During the tools build (from src/tools/awk/Makefile),
31# src/tools/Makefile.host changes .CURDIR back and forth between
32# src/tools/awk and src/usr.bin/awk.  For some unknown reason, including
33# bsd.info.mk here leads to the obj dir being created at the wrong time,
34# while .CURDIR is src/usr.bin/awk.  Work around the problem by not
35# including bsd.info.mk when MKINFO=no.
36.if ${MKINFO} != "no"
37.include <bsd.info.mk>
38.endif
39
40.include <bsd.prog.mk>
41