diff options
author | Roy Marples <roy@marples.name> | 2007-11-19 13:48:43 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-11-19 13:48:43 +0000 |
commit | 5f8cf73b22b259658d92397f3e6478ef80ed5691 (patch) | |
tree | 56b3aee976fcb92d04d406860081daaed8c7208c /src | |
parent | 2ef9c5c5208d6d911c3826d94ac72c2bd9813c2c (diff) |
Our build chain now works with GNU and BSD make implementations
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/Makefile b/src/Makefile index 90e23153..0e449194 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,7 +10,7 @@ # that works with GNU make and vice versa. NetBSD and OpenBSD makes do. # You can get a patch from # http://www.freebsd.org/cgi/query-pr.cgi?pr=standards/116081 -# to fix this. We include this patch with Gentoo/FreeBSD :) +# to fix this. CC ?= gcc CFLAGS += -O2 -pipe @@ -39,10 +39,6 @@ CFLAGS += -pedantic -std=c99 \ # For debugging. -Werror is pointless due to ISO C issues with dlsym #CFLAGS += -ggdb -DESTDIR = -LIB = lib -RC_LIB = /$(LIB)/rc - # Set PAM = pam for pam support PAM = @@ -98,9 +94,8 @@ CPPFLAGS += -DLIB=\"$(LIB)\" LDFLAGS += -Wl,-rpath . # Load an optional OS Makefile -_OS_SH = u=`uname -s`; case "$${u}" in *BSD|DragonFly) echo "BSD";; *) echo "$${u}";; esac -_OS != $(_OS_SH) -OS ?= $(_OS)$(shell $(_OS_SH)) +TOPDIR = .. +include $(TOPDIR)/default.mk include Makefile.$(OS) include Makefile.$(PAM) @@ -137,7 +132,7 @@ $(ALL_LINKS): rc ln -sf rc $@ links: $(ALL_LINKS) -install: $(TARGET) +install:: $(TARGET) install -m 0755 -d $(DESTDIR)/$(LIB) install -m 0755 $(LIB_TARGETS) $(DESTDIR)/$(LIB) install -m 0755 -d $(DESTDIR)/usr/$(LIB) @@ -165,7 +160,7 @@ install: $(TARGET) clean-links: rm -f $(ALL_LINKS) -clean: clean-links +clean:: echo > .depend touch -r Makefile .depend rm -f $(TARGET) |