Let the build system manage compilation flags
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
This commit is contained in:
parent
10f4c3fbb1
commit
fbd82e76a4
6 changed files with 16 additions and 9 deletions
|
@ -1,10 +1,12 @@
|
||||||
# Makefile for libmthread
|
# Makefile for libgpio
|
||||||
|
|
||||||
CPPFLAGS+= -O1 -Wall -Werror -D_SYSTEM
|
CPPFLAGS+= -D_SYSTEM
|
||||||
|
|
||||||
LIB= gpio
|
LIB= gpio
|
||||||
|
|
||||||
SRCS= \
|
SRCS= \
|
||||||
gpio_omap.c clkconf.c
|
gpio_omap.c clkconf.c
|
||||||
|
|
||||||
|
WARNS?= 5
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# Makefile for libmthread
|
# Makefile for libmthread
|
||||||
|
|
||||||
CPPFLAGS+= -O1 -Wall -Werror
|
|
||||||
|
|
||||||
LIB= mthread
|
LIB= mthread
|
||||||
|
|
||||||
SRCS= \
|
SRCS= \
|
||||||
|
@ -16,4 +14,6 @@ SRCS= \
|
||||||
scheduler.c \
|
scheduler.c \
|
||||||
key.c
|
key.c
|
||||||
|
|
||||||
|
WARNS?= 5
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
# Makefile for libpadconf
|
# Makefile for libpadconf
|
||||||
|
|
||||||
CPPFLAGS+= -O1 -Wall -Werror -D_SYSTEM
|
CPPFLAGS+= -D_SYSTEM
|
||||||
|
|
||||||
LIB= padconf
|
LIB= padconf
|
||||||
|
|
||||||
SRCS= \
|
SRCS= \
|
||||||
padconf.c
|
padconf.c
|
||||||
|
|
||||||
|
WARNS?= 5
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
|
|
@ -6,7 +6,7 @@ LIB= refuse
|
||||||
LIBDPLIBS+= puffs ${.CURDIR}/../libpuffs
|
LIBDPLIBS+= puffs ${.CURDIR}/../libpuffs
|
||||||
|
|
||||||
.ifdef DEBUG
|
.ifdef DEBUG
|
||||||
FUSE_OPT_DEBUG_FLAGS= -g -DFUSE_OPT_DEBUG
|
FUSE_OPT_DEBUG_FLAGS= -DFUSE_OPT_DEBUG
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
CFLAGS+= ${FUSE_OPT_DEBUG_FLAGS}
|
CFLAGS+= ${FUSE_OPT_DEBUG_FLAGS}
|
||||||
|
@ -16,4 +16,6 @@ WARNS= 4
|
||||||
INCS= fuse.h fuse_opt.h
|
INCS= fuse.h fuse_opt.h
|
||||||
INCSDIR= /usr/include
|
INCSDIR= /usr/include
|
||||||
|
|
||||||
|
WARNS?= 5
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
|
|
@ -21,6 +21,8 @@ MAN=
|
||||||
|
|
||||||
BINDIR?= /usr/sbin
|
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>
|
.include <minix.service.mk>
|
||||||
|
|
|
@ -6,13 +6,12 @@ __MINIX= yes
|
||||||
|
|
||||||
.if defined(__MINIX)
|
.if defined(__MINIX)
|
||||||
.if ${MKSMALL:U} == "yes"
|
.if ${MKSMALL:U} == "yes"
|
||||||
|
CPPFLAGS+= -DNDEBUG
|
||||||
DBG= -Os
|
DBG= -Os
|
||||||
CFLAGS+= -DNDEBUG
|
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
unix?= We run MINIX.
|
unix?= We run MINIX.
|
||||||
|
|
||||||
DBG?= -O
|
|
||||||
CPP?= /usr/lib/cpp
|
CPP?= /usr/lib/cpp
|
||||||
.endif # defined(__MINIX)
|
.endif # defined(__MINIX)
|
||||||
unix?= We run NetBSD.
|
unix?= We run NetBSD.
|
||||||
|
|
Loading…
Reference in a new issue