Use CFLAGS, not COPTS, in the Makefile. bsd.prog.mk conveniently adds

COPTS towards the end of final CFLAGS so that it can be used to
override Makefile and other defaults.  Using it in Makefiles risks
having options set using it clobbered when somebody uses it on the
command line.

Approved by:	bde
This commit is contained in:
dd 2001-09-05 20:10:59 +00:00
parent 860ee32ac4
commit 91ffaa180c
6 changed files with 10 additions and 9 deletions

View File

@ -28,7 +28,7 @@ DPADD= ${LIBIPX}
LDADD= -lipx
.endif
COPTS= -DNS -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings \
CFLAGS+=-DNS -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings \
-Wnested-externs -I..
.include <bsd.prog.mk>

View File

@ -4,9 +4,9 @@
PROG= ping
MAN= ping.8
BINMODE=4555
COPTS+= -Wall -Wmissing-prototypes
CFLAGS+=-Wall -Wmissing-prototypes
.if ${MACHINE_ARCH} == "alpha"
COPTS+= -fno-builtin # GCC's builtin memcpy doesn't do unaligned copies
CFLAGS+=-fno-builtin # GCC's builtin memcpy doesn't do unaligned copies
.endif
DPADD= ${LIBM}
LDADD= -lm

View File

@ -22,11 +22,11 @@ LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh
MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
COPTS+= -DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
CFLAGS+=-DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
-I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
#Some people need this, uncomment to activate
#COPTS+= -DRESTRICT_FULLNAME_CHANGE
#CFLAGS+=-DRESTRICT_FULLNAME_CHANGE
DPADD= ${LIBRPCSVC} ${LIBCRYPT} ${LIBMD}
LDADD+= -lrpcsvc -lcrypt -lmd

View File

@ -2,6 +2,6 @@
# $FreeBSD$
PROG= logger
COPTS+= -DINET6
CFLAGS+=-DINET6
.include <bsd.prog.mk>

View File

@ -1,6 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
PROG= split
COPTS+= -Wall
CFLAGS+=-Wall
.include <bsd.prog.mk>

View File

@ -9,8 +9,8 @@ MLINKS= inetd.8 inetd.conf.5
SRCS= inetd.c builtins.c
#WARNS?= 2
COPTS+= -DLOGIN_CAP
#COPTS+= -DSANITY_CHECK
CFLAGS+= -DLOGIN_CAP
#CFLAGS+= -DSANITY_CHECK
DPADD= ${LIBUTIL} ${LIBWRAP}
LDADD= -lutil -lwrap