diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2008-10-19 19:37:28 -0700 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2008-10-19 19:37:28 -0700 |
commit | 0a42b493f24035415047ff79ad46e5c27e2ee11e (patch) | |
tree | 7300a73ec47e1639bf3dd35b0995af81499e0e0d | |
parent | 100d8e3ab0eb44b0def28d6f5e858dbc6398ec6c (diff) | |
download | libcap2-0a42b493f24035415047ff79ad46e5c27e2ee11e.tar.gz |
Make programs dynamically linked.
Suggestion from the Slackware folk (Thanks Robby Workman for
pointing out Pat's change).
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r-- | Make.Rules | 2 | ||||
-rw-r--r-- | progs/Makefile | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -65,6 +65,8 @@ LDFLAGS += -L$(topdir)/libcap CFLAGS += -Dlinux $(WARNINGS) $(DEBUG) $(IPATH) PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi) INDENT := $(shell if [ -z "$(which ident 2>/dev/null)" ]; then echo "| indent -kr" ; fi) +DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi) + # Global cleanup stuff LOCALCLEAN=rm -f *~ core diff --git a/progs/Makefile b/progs/Makefile index 3f66a38..ef8f056 100644 --- a/progs/Makefile +++ b/progs/Makefile @@ -7,7 +7,9 @@ include $(topdir)/Make.Rules PROGS=getpcaps getcap setcap capsh BUILD=$(PROGS) verify-caps +ifneq ($(DYNAMIC),yes) LDFLAGS += --static +endif LDLIBS += -lcap all: $(BUILD) |