Makefile revision 1.56
1#	$NetBSD: Makefile,v 1.56 2021/01/05 23:50:29 rillig Exp $
2
3.include <bsd.own.mk>
4
5PROG=		lint1
6SRCS=		cgram.y decl.c emit.c emit1.c err.c func.c init.c inittyp.c \
7		main1.c mem.c mem1.c ops.c print.c scan.l tree.c tyname.c
8
9MAN=		lint.7
10YHEADER=
11#DBG=-g
12#CPPFLAGS+=-DYYDEBUG=1
13#YFLAGS+=-v
14#LFLAGS+=-d
15
16CWARNFLAGS.clang+=	-Wno-error=implicit-int-float-conversion
17
18CPPFLAGS+=	-I${.CURDIR} -I. -DPASS=\"${PROG}.h\"
19
20BINDIR=		/usr/libexec
21
22CLEANFILES+=	${MAN}
23
24.if ${USETOOLS} == "yes"
25LINT1=		${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-lint1
26.endif
27LINT1?=		./${PROG}
28
29${MAN}:		makeman ${LINT1:C/^\.\///} Makefile
30	${_MKTARGET_CREATE}
31	${HOST_SH} ${.ALLSRC:M*makeman} ${LINT1} -m >${.TARGET}
32
33LDADD+=		-lm
34.ifndef HOSTPROG
35DPADD+=		${LIBM}
36
37LDADD+=		-ll
38DPADD+=		${LIBL}
39.endif
40
41ops.o: ops.def
42
43.include "Makefile.err-msgs-h"
44${SRCS:Nerr.c}: err-msgs.h
45
46.include <bsd.prog.mk>
47