2c6ed6826b
Since several years GCC validates printf-style strings, and there is no reason not to let GCC do that work. This prevents bugs like the segmentation fault that was fixed in tree.c 1.109 from 2021-01-01. By default, lint is compiled with DEBUG off, but it's easy enough to compile it in debug mode once in a while.
49 lines
923 B
Makefile
49 lines
923 B
Makefile
# $NetBSD: Makefile,v 1.55 2021/01/03 18:48:37 rillig Exp $
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
PROG= lint1
|
|
SRCS= cgram.y decl.c emit.c emit1.c err.c func.c init.c inittyp.c \
|
|
main1.c mem.c mem1.c print.c scan.l tree.c tyname.c
|
|
|
|
MAN= lint.7
|
|
YHEADER=
|
|
#DBG=-g
|
|
#CPPFLAGS+=-DYYDEBUG=1
|
|
#YFLAGS+=-v
|
|
#LFLAGS+=-d
|
|
|
|
CWARNFLAGS.clang+= -Wno-error=implicit-int-float-conversion
|
|
|
|
CPPFLAGS+= -I${.CURDIR} -I. -DPASS=\"${PROG}.h\"
|
|
|
|
BINDIR= /usr/libexec
|
|
|
|
CLEANFILES+= ${MAN}
|
|
|
|
.if ${USETOOLS} == "yes"
|
|
LINT1= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-lint1
|
|
.endif
|
|
LINT1?= ./${PROG}
|
|
|
|
${MAN}: makeman ${LINT1:C/^\.\///} Makefile
|
|
${_MKTARGET_CREATE}
|
|
${HOST_SH} ${.ALLSRC:M*makeman} ${LINT1} -m >${.TARGET}
|
|
|
|
LDADD+= -lm
|
|
.ifndef HOSTPROG
|
|
DPADD+= ${LIBM}
|
|
|
|
LDADD+= -ll
|
|
DPADD+= ${LIBL}
|
|
.endif
|
|
|
|
.include "Makefile.err-msgs-h"
|
|
.include "Makefile.ops-h"
|
|
.include "Makefile.ops-c"
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
${SRCS}: ops.h
|
|
${SRCS:Nerr.c}: err-msgs.h
|