aboutsummaryrefslogtreecommitdiff
path: root/share/mk/bsd.prog.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/bsd.prog.mk')
-rw-r--r--share/mk/bsd.prog.mk19
1 files changed, 17 insertions, 2 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 43bb9e8e2c47..8ae4063a3b65 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -5,8 +5,17 @@
.SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .ln .s .S .asm
-CFLAGS+=${COPTS} ${DEBUG_FLAGS}
+.if defined(COPTS)
+CFLAGS+=${COPTS}
+.endif
+
+.if defined(DEBUG_FLAGS)
+CFLAGS+=${DEBUG_FLAGS}
+.endif
+
+.if defined(CRUNCH_CFLAGS)
CFLAGS+=${CRUNCH_CFLAGS}
+.endif
.if !defined(DEBUG_FLAGS)
STRIP?= -s
@@ -79,7 +88,13 @@ all: objwarn ${PROG} ${SCRIPTS}
all: _manpages
.endif
-CLEANFILES+= ${PROG} ${OBJS}
+.if defined(PROG)
+CLEANFILES+= ${PROG}
+.endif
+
+.if defined(OBJS)
+CLEANFILES+= ${OBJS}
+.endif
.if defined(PROG)
_EXTRADEPEND: