From 11acce3c7d516578f91931f6613cb181f78c27d0 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 19 Jun 2008 23:12:00 +0000 Subject: Use CPPFLAGS so we work with -combine in CFLAGS. --- mk/debug.mk | 2 +- mk/depend.mk | 2 +- mk/lib.mk | 2 +- mk/ncurses.mk | 2 +- mk/os-Linux.mk | 2 +- mk/pam.mk | 2 +- mk/prog.mk | 3 +++ mk/termcap.mk | 2 +- src/libeinfo/Makefile | 2 +- src/librc/Makefile | 2 +- src/rc/Makefile | 2 +- 11 files changed, 13 insertions(+), 10 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 diff --git a/mk/lib.mk b/mk/lib.mk index bf775d17..b7c07891 100644 --- a/mk/lib.mk +++ b/mk/lib.mk @@ -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 # 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 diff --git a/mk/pam.mk b/mk/pam.mk index 7d0f2ca0..65115d5d 100644 --- a/mk/pam.mk +++ b/mk/pam.mk @@ -1,5 +1,5 @@ LIBPAM?= -lpam -CFLAGS+= -DHAVE_PAM +CPPFLAGS+= -DHAVE_PAM LDADD+= ${LIBPAM} PAMDIR?= /etc/pam.d diff --git a/mk/prog.mk b/mk/prog.mk index a76bca44..288327e8 100644 --- a/mk/prog.mk +++ b/mk/prog.mk @@ -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} diff --git a/src/libeinfo/Makefile b/src/libeinfo/Makefile index 4c381cea..1569f8f4 100644 --- a/src/libeinfo/Makefile +++ b/src/libeinfo/Makefile @@ -4,7 +4,7 @@ SRCS= libeinfo.c INCS= einfo.h VERSION_MAP= einfo.map -CFLAGS+= -I../includes +CPPFLAGS+= -I../includes MK= ../../mk include ${MK}/lib.mk diff --git a/src/librc/Makefile b/src/librc/Makefile index 0408b2b5..902b14e9 100644 --- a/src/librc/Makefile +++ b/src/librc/Makefile @@ -7,7 +7,7 @@ VERSION_MAP= rc.map LDADD+= ${LIBKVM} -CFLAGS+= -I../includes +CPPFLAGS+= -I../includes MK= ../../mk include ${MK}/lib.mk diff --git a/src/rc/Makefile b/src/rc/Makefile index 206d66b8..5b3be058 100644 --- a/src/rc/Makefile +++ b/src/rc/Makefile @@ -38,7 +38,7 @@ include ${MK}/prog.mk include ${MK}/cc.mk include ${MK}/debug.mk -CFLAGS+= -I../includes -I../librc -I../libeinfo +CPPFLAGS+= -I../includes -I../librc -I../libeinfo include ${MK}/${MKTERMCAP}.mk LDADD+= ${LIBDL} ${LIBKVM} -- cgit v1.2.3