From 74e0e58b899accd2bd72a7d7303331e47089959f Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 7 Jan 2008 09:39:44 +0000 Subject: Stop using CPPFLAGS --- src/lib.mk | 2 +- src/librc/Makefile | 17 ++++++++-------- src/ncurses.mk | 4 ++-- src/os.mk | 2 +- src/pam.mk | 10 +++++----- src/prog.mk | 3 +-- src/rc/Makefile | 58 +++++++++++++++++++++++++++--------------------------- src/termcap.mk | 4 ++-- 8 files changed, 50 insertions(+), 50 deletions(-) (limited to 'src') diff --git a/src/lib.mk b/src/lib.mk index 272d9077..574fd383 100644 --- a/src/lib.mk +++ b/src/lib.mk @@ -30,7 +30,7 @@ LIBMODE?= 0444 .SUFFIXES: .So .c.So: - ${CC} ${PICFLAG} -DPIC ${CFLAGS} ${CPPFLAGS} -c $< -o $@ + ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c $< -o $@ all: ${_LIBS} diff --git a/src/librc/Makefile b/src/librc/Makefile index 722f4a31..e510b1f4 100644 --- a/src/librc/Makefile +++ b/src/librc/Makefile @@ -1,16 +1,17 @@ -TOPDIR= .. +TOPDIR= .. include $(TOPDIR)/os.mk -LIB= rc -SHLIB_MAJOR= 1 -SRCS= librc.c librc-daemon.c librc-depend.c librc-misc.c librc-strlist.c -INCS= rc.h +LIB= rc +SHLIB_MAJOR= 1 +SRCS= librc.c librc-daemon.c librc-depend.c librc-misc.c \ + librc-strlist.c +INCS= rc.h VERSION_MAP= rc.map -CPPFLAGS+= -DLIB=\"${LIBNAME}\" -LDADD+= ${LIBKVM} +CFLAGS+= -DLIB=\"${LIBNAME}\" +LDADD+= ${LIBKVM} -SHLIBDIR= /${LIBNAME} +SHLIBDIR= /${LIBNAME} include $(TOPDIR)/cc.mk include $(TOPDIR)/lib.mk diff --git a/src/ncurses.mk b/src/ncurses.mk index f1df47f0..66573d61 100644 --- a/src/ncurses.mk +++ b/src/ncurses.mk @@ -1,3 +1,3 @@ LIBTERMCAP?= -lncurses -CPPFLAGS+= -DHAVE_TERMCAP -LDADD+= ${LIBTERMCAP} +CFLAGS+= -DHAVE_TERMCAP +LDADD+= ${LIBTERMCAP} diff --git a/src/os.mk b/src/os.mk index 6b8b56d9..9bfddb0c 100644 --- a/src/os.mk +++ b/src/os.mk @@ -13,7 +13,7 @@ RC_LIB= /$(LIB)/rc _DEF_SH= case `uname -s` in Linux) echo "-D_XOPEN_SOURCE=600 -D_BSD_SOURCE";; *) echo;; esac _DEF!= $(_DEF_SH) -CPPFLAGS+= $(_DEF)$(shell $(_DEF_SH)) +CFLAGS+= $(_DEF)$(shell $(_DEF_SH)) _LIBDL_SH= case `uname -s` in Linux) echo "-Wl,-Bdynamic -ldl";; *) echo;; esac _LIBDL!= $(_LIBDL_SH) diff --git a/src/pam.mk b/src/pam.mk index a9c961ed..7d0f2ca0 100644 --- a/src/pam.mk +++ b/src/pam.mk @@ -1,6 +1,6 @@ -LIBPAM?= -lpam -CPPFLAGS+= -DHAVE_PAM -LDADD+= ${LIBPAM} +LIBPAM?= -lpam +CFLAGS+= -DHAVE_PAM +LDADD+= ${LIBPAM} -PAMDIR?= /etc/pam.d -PAMMODE?= 0644 +PAMDIR?= /etc/pam.d +PAMMODE?= 0644 diff --git a/src/prog.mk b/src/prog.mk index 1d0f013f..ea7f4fc7 100644 --- a/src/prog.mk +++ b/src/prog.mk @@ -4,7 +4,6 @@ # Copyright 2008 Roy Marples BINDIR?= /sbin - OBJS+= ${SRCS:.c=.o} INSTALL?= install @@ -12,7 +11,7 @@ INSTALL?= install all: ${PROG} ${PROG}: ${SCRIPTS} ${OBJS} - ${CC} ${CFLAGS} ${LDFLAGS} ${PROGLDFLAGS} ${CPPFLAGS} -o $@ ${OBJS} ${LDADD} + ${CC} ${CFLAGS} ${LDFLAGS} ${PROGLDFLAGS} -o $@ ${OBJS} ${LDADD} clean: rm -f ${OBJS} ${PROG} ${CLEANFILES} diff --git a/src/rc/Makefile b/src/rc/Makefile index da0c95ed..2f1c4ca4 100644 --- a/src/rc/Makefile +++ b/src/rc/Makefile @@ -1,45 +1,45 @@ -PROG= rc -SRCS= checkpath.c fstabinfo.c mountinfo.c rc.c rc-depend.c \ - rc-logger.c rc-misc.c rc-plugin.c rc-status.c rc-update.c \ - runscript.c start-stop-daemon.c +PROG= rc +SRCS= checkpath.c fstabinfo.c mountinfo.c rc.c rc-depend.c \ + rc-logger.c rc-misc.c rc-plugin.c rc-status.c rc-update.c \ + runscript.c start-stop-daemon.c -SCRIPTS= version.h -CLEANFILES= version.h +SCRIPTS= version.h +CLEANFILES= version.h -TOPDIR= .. +TOPDIR= .. -LDFLAGS+= -L$(TOPDIR)/librc -L$(TOPDIR)/libeinfo -LDADD+= -lutil -lrc -leinfo -CPPFLAGS+= -I$(TOPDIR) -I$(TOPDIR)/librc -I$(TOPDIR)/libeinfo +LDFLAGS+= -L$(TOPDIR)/librc -L$(TOPDIR)/libeinfo +LDADD+= -lutil -lrc -leinfo +CFLAGS+= -I$(TOPDIR) -I$(TOPDIR)/librc -I$(TOPDIR)/libeinfo -BINDIR?= /sbin +BINDIR?= /sbin -LINKDIR= $(LIBNAME)/$(PROG) -BINLINKS= rc-status -SBINLINKS= rc-update runscript start-stop-daemon +LINKDIR= $(LIBNAME)/$(PROG) +BINLINKS= rc-status +SBINLINKS= rc-update runscript start-stop-daemon RC_BINLINKS= einfon einfo ewarnn ewarn eerrorn eerror ebegin eend ewend \ - eindent eoutdent esyslog eval_ecolors \ - veinfo vewarn vebegin veend vewend veindent veoutdent \ - service_starting service_started \ - service_stopping service_stopped \ - service_inactive service_wasinactive \ - service_coldplugged service_started_daemon \ - checkpath fstabinfo mountinfo rc-depend \ - service_get_value service_set_value get_options save_options \ - shell_var + eindent eoutdent esyslog eval_ecolors \ + veinfo vewarn vebegin veend vewend veindent veoutdent \ + service_starting service_started \ + service_stopping service_stopped \ + service_inactive service_wasinactive \ + service_coldplugged service_started_daemon \ + checkpath fstabinfo mountinfo rc-depend \ + service_get_value service_set_value get_options save_options \ + shell_var RC_SBINLINKS= mark_service_starting mark_service_started \ - mark_service_stopping mark_service_stopped \ - mark_service_inactive mark_service_wasinactive \ - mark_service_coldplugged mark_service_failed \ - rc-abort + mark_service_stopping mark_service_stopped \ + mark_service_inactive mark_service_wasinactive \ + mark_service_coldplugged mark_service_failed \ + rc-abort include $(TOPDIR)/os.mk -CPPFLAGS+= -DLIB=\"$(LIBNAME)\" +CFLAGS+= -DLIB=\"$(LIBNAME)\" include $(TOPDIR)/cc.mk include $(TOPDIR)/prog.mk include $(TOPDIR)/$(TERMCAP).mk -LDADD+= ${LIBDL} ${LIBKVM} +LDADD+= ${LIBDL} ${LIBKVM} include $(TOPDIR)/$(PAM).mk version.h: diff --git a/src/termcap.mk b/src/termcap.mk index 7b5058db..62a251ac 100644 --- a/src/termcap.mk +++ b/src/termcap.mk @@ -1,3 +1,3 @@ LIBTERMCAP?= -ltermcap -CPPFLAGS+= -DHAVE_TERMCAP -LDADD+= ${LIBTERMCAP} +CFLAGS+= -DHAVE_TERMCAP +LDADD+= ${LIBTERMCAP} -- cgit v1.2.3