diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/debug.mk | 2 | ||||
-rw-r--r-- | mk/depend.mk | 2 | ||||
-rw-r--r-- | mk/lib.mk | 2 | ||||
-rw-r--r-- | mk/ncurses.mk | 2 | ||||
-rw-r--r-- | mk/os-Linux.mk | 2 | ||||
-rw-r--r-- | mk/pam.mk | 2 | ||||
-rw-r--r-- | mk/prog.mk | 3 | ||||
-rw-r--r-- | mk/termcap.mk | 2 |
8 files changed, 10 insertions, 7 deletions
diff --git a/mk/debug.mk b/mk/debug.mk index d4b959f7..4008efa1 100644 --- a/mk/debug.mk +++ b/mk/debug.mk @@ -4,7 +4,7 @@ _RC_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-DRC_DEBUG";; esac _RC_DEBUG!= ${_RC_DEBUG_SH} -CFLAGS+= ${_RC_DEBUG}$(shell ${_RC_DEBUG_SH}) +CPPFLAGS+= ${_RC_DEBUG}$(shell ${_RC_DEBUG_SH}) # Should we enable this with a different flag? _LD_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-Wl,--rpath=../librc -Wl,--rpath=../libeinfo";; esac diff --git a/mk/depend.mk b/mk/depend.mk index 7c5343ca..bec382e5 100644 --- a/mk/depend.mk +++ b/mk/depend.mk @@ -8,6 +8,6 @@ CLEANFILES+= .depend IGNOREFILES+= .depend .depend: ${SRCS} - ${CC} ${CFLAGS} -MM ${SRCS} > .depend + ${CC} ${CPPFLAGS} -MM ${SRCS} > .depend depend: .depend @@ -17,7 +17,7 @@ CLEANFILES+= ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK} .SUFFIXES: .So .c.So: - ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c $< -o $@ + ${CC} ${PICFLAG} -DPIC ${CPPFLAGS} ${CFLAGS} -c $< -o $@ all: depend ${_LIBS} diff --git a/mk/ncurses.mk b/mk/ncurses.mk index 66573d61..d93e8fbe 100644 --- a/mk/ncurses.mk +++ b/mk/ncurses.mk @@ -1,3 +1,3 @@ LIBTERMCAP?= -lncurses -CFLAGS+= -DHAVE_TERMCAP +CPPFLAGS+= -DHAVE_TERMCAP LDADD+= ${LIBTERMCAP} diff --git a/mk/os-Linux.mk b/mk/os-Linux.mk index 6192c2c7..ea2cc5a3 100644 --- a/mk/os-Linux.mk +++ b/mk/os-Linux.mk @@ -1,5 +1,5 @@ # Copyright 2008 Roy Marples <roy@marples.name> # All rights reserved. Released under the 2-clause BSD license. -CFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=600 +CPPFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=600 LIBDL= -Wl,-Bdynamic -ldl @@ -1,5 +1,5 @@ LIBPAM?= -lpam -CFLAGS+= -DHAVE_PAM +CPPFLAGS+= -DHAVE_PAM LDADD+= ${LIBPAM} PAMDIR?= /etc/pam.d @@ -24,6 +24,9 @@ CLEANFILES+= ${OBJS} ${PROG} all: depend ${PROG} +.c.o: + ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ + ${PROG}: ${SCRIPTS} ${OBJS} ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD} diff --git a/mk/termcap.mk b/mk/termcap.mk index 62a251ac..7a603e38 100644 --- a/mk/termcap.mk +++ b/mk/termcap.mk @@ -1,3 +1,3 @@ LIBTERMCAP?= -ltermcap -CFLAGS+= -DHAVE_TERMCAP +CPPFLAGS+= -DHAVE_TERMCAP LDADD+= ${LIBTERMCAP} |