Use CPPFLAGS so we work with -combine in CFLAGS.

This commit is contained in:
Roy Marples 2008-06-19 23:12:00 +00:00
parent 4f2bb5ceaf
commit 11acce3c7d
11 changed files with 13 additions and 10 deletions

View File

@ -4,7 +4,7 @@
_RC_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-DRC_DEBUG";; esac _RC_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-DRC_DEBUG";; esac
_RC_DEBUG!= ${_RC_DEBUG_SH} _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? # Should we enable this with a different flag?
_LD_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-Wl,--rpath=../librc -Wl,--rpath=../libeinfo";; esac _LD_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-Wl,--rpath=../librc -Wl,--rpath=../libeinfo";; esac

View File

@ -8,6 +8,6 @@ CLEANFILES+= .depend
IGNOREFILES+= .depend IGNOREFILES+= .depend
.depend: ${SRCS} .depend: ${SRCS}
${CC} ${CFLAGS} -MM ${SRCS} > .depend ${CC} ${CPPFLAGS} -MM ${SRCS} > .depend
depend: .depend depend: .depend

View File

@ -17,7 +17,7 @@ CLEANFILES+= ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK}
.SUFFIXES: .So .SUFFIXES: .So
.c.So: .c.So:
${CC} ${PICFLAG} -DPIC ${CFLAGS} -c $< -o $@ ${CC} ${PICFLAG} -DPIC ${CPPFLAGS} ${CFLAGS} -c $< -o $@
all: depend ${_LIBS} all: depend ${_LIBS}

View File

@ -1,3 +1,3 @@
LIBTERMCAP?= -lncurses LIBTERMCAP?= -lncurses
CFLAGS+= -DHAVE_TERMCAP CPPFLAGS+= -DHAVE_TERMCAP
LDADD+= ${LIBTERMCAP} LDADD+= ${LIBTERMCAP}

View File

@ -1,5 +1,5 @@
# Copyright 2008 Roy Marples <roy@marples.name> # Copyright 2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license. # 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 LIBDL= -Wl,-Bdynamic -ldl

View File

@ -1,5 +1,5 @@
LIBPAM?= -lpam LIBPAM?= -lpam
CFLAGS+= -DHAVE_PAM CPPFLAGS+= -DHAVE_PAM
LDADD+= ${LIBPAM} LDADD+= ${LIBPAM}
PAMDIR?= /etc/pam.d PAMDIR?= /etc/pam.d

View File

@ -24,6 +24,9 @@ CLEANFILES+= ${OBJS} ${PROG}
all: depend ${PROG} all: depend ${PROG}
.c.o:
${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
${PROG}: ${SCRIPTS} ${OBJS} ${PROG}: ${SCRIPTS} ${OBJS}
${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD} ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD}

View File

@ -1,3 +1,3 @@
LIBTERMCAP?= -ltermcap LIBTERMCAP?= -ltermcap
CFLAGS+= -DHAVE_TERMCAP CPPFLAGS+= -DHAVE_TERMCAP
LDADD+= ${LIBTERMCAP} LDADD+= ${LIBTERMCAP}

View File

@ -4,7 +4,7 @@ SRCS= libeinfo.c
INCS= einfo.h INCS= einfo.h
VERSION_MAP= einfo.map VERSION_MAP= einfo.map
CFLAGS+= -I../includes CPPFLAGS+= -I../includes
MK= ../../mk MK= ../../mk
include ${MK}/lib.mk include ${MK}/lib.mk

View File

@ -7,7 +7,7 @@ VERSION_MAP= rc.map
LDADD+= ${LIBKVM} LDADD+= ${LIBKVM}
CFLAGS+= -I../includes CPPFLAGS+= -I../includes
MK= ../../mk MK= ../../mk
include ${MK}/lib.mk include ${MK}/lib.mk

View File

@ -38,7 +38,7 @@ include ${MK}/prog.mk
include ${MK}/cc.mk include ${MK}/cc.mk
include ${MK}/debug.mk include ${MK}/debug.mk
CFLAGS+= -I../includes -I../librc -I../libeinfo CPPFLAGS+= -I../includes -I../librc -I../libeinfo
include ${MK}/${MKTERMCAP}.mk include ${MK}/${MKTERMCAP}.mk
LDADD+= ${LIBDL} ${LIBKVM} LDADD+= ${LIBDL} ${LIBKVM}