Do not hardcode warning and optimisation flags, otherwise the
main options (i.e. DBG, CPPFLAGS) will not work as expected.
You can still provide specific default by using DBG?=<value>.
Doing so leaves the opportunity to override the setting from the
commandline, while the default value from the build system is
then ignored for that particular package.
When crosscompiling, and using build.sh, adding -V DBG=<value> has
this same effect as make DBG=<value>.
Change-Id: Ic610e4d33b945acad64571e1431f1814291e2d84
-# Makefile for libmthread
+# Makefile for libgpio
-CPPFLAGS+= -O1 -Wall -Werror -D_SYSTEM
+CPPFLAGS+= -D_SYSTEM
LIB= gpio
SRCS= \
gpio_omap.c clkconf.c
+WARNS?= 5
+
.include <bsd.lib.mk>
# Makefile for libmthread
-CPPFLAGS+= -O1 -Wall -Werror
-
LIB= mthread
SRCS= \
scheduler.c \
key.c
+WARNS?= 5
+
.include <bsd.lib.mk>
# Makefile for libpadconf
-CPPFLAGS+= -O1 -Wall -Werror -D_SYSTEM
+CPPFLAGS+= -D_SYSTEM
LIB= padconf
SRCS= \
padconf.c
+WARNS?= 5
+
.include <bsd.lib.mk>
LIBDPLIBS+= puffs ${.CURDIR}/../libpuffs
.ifdef DEBUG
-FUSE_OPT_DEBUG_FLAGS= -g -DFUSE_OPT_DEBUG
+FUSE_OPT_DEBUG_FLAGS= -DFUSE_OPT_DEBUG
.endif
CFLAGS+= ${FUSE_OPT_DEBUG_FLAGS}
INCS= fuse.h fuse_opt.h
INCSDIR= /usr/include
+WARNS?= 5
+
.include <bsd.lib.mk>
BINDIR?= /usr/sbin
-CPPFLAGS+= -I${.CURDIR} -D'ARGS(a)=a' -Wall -Werror
+CPPFLAGS+= -I${.CURDIR} -D'ARGS(a)=a'
+
+WARNS?= 5
.include <minix.service.mk>
.if defined(__MINIX)
.if ${MKSMALL:U} == "yes"
+CPPFLAGS+= -DNDEBUG
DBG= -Os
-CFLAGS+= -DNDEBUG
.endif
unix?= We run MINIX.
-DBG?= -O
CPP?= /usr/lib/cpp
.endif # defined(__MINIX)
unix?= We run NetBSD.