aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-04-13 13:06:53 +0000
committerMike Frysinger <vapier@gentoo.org>2007-04-13 13:06:53 +0000
commit2348f115c0a4cf70e3b1eec5520fa0f47634ef8c (patch)
tree259dcbb955c6a4bbcbbfbefbd4a727cc34215a93 /src/Makefile
parent5ee5f0c661b285ae211e2d776ff1a5b961e72fd6 (diff)
use CPPFLAGS rather than CFLAGS where appropriate and make LDFLAGS/-rpath dynamic by only enabling when in .svn repo
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index 78daa2ec..900dd555 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -64,7 +64,7 @@ LDLIBS_RC = -ldl
LDLIBS_RS = -ldl
# Shouldn't need this, but it's the easiest workaround for silly
# Linux headers that don't work with -std=c99
-override CFLAGS += -D_GNU_SOURCE
+override CPPFLAGS += -D_GNU_SOURCE
endif
ifeq ($(OS),BSD)
override LDLIBS += -lkvm
@@ -72,20 +72,22 @@ endif
HAVE_PAM =
ifdef HAVE_PAM
-CFLAGS_SSD = -DHAVE_PAM
+CPPFLAGS_SSD = -DHAVE_PAM
LDLIBS_SSD = -lpam
endif
# We also define _BSD_SOURCE so both Linux and the BSDs get a few
# handy functions which makes our lives a lot easier
-override CFLAGS += -DLIB=\"$(LIB)\"
+override CPPFLAGS += -DLIB=\"$(LIB)\"
# IMPORTANT!!!
# Remove this when releasing as it's a security risk
# However, this does save us using libtool when we're testing
# NOTE: The toplevel Makefile for baselayout will automatically
# disable then when doing `make dist`
+ifneq ($(wildcard .svn),)
override LDFLAGS += -Wl,-rpath .
+endif
all: $(TARGET)
@@ -118,7 +120,7 @@ rc: $(LIBEINFOSO) $(LIBRCSO) rc-plugin.o rc.o
runscript: LDLIBS += $(LDLIBS_RS)
runscript: $(LIBEINFOSO) $(LIBRCSO) rc-plugin.o runscript.o
-start-stop-daemon: CFLAGS += $(CFLAGS_SSD)
+start-stop-daemon: CPPFLAGS += $(CPPFLAGS_SSD)
start-stop-daemon: LDLIBS += $(LDLIBS_SSD)
start-stop-daemon: $(LIBEINFOSO) $(LIBRCSO) start-stop-daemon.o