diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2008-10-16 17:50:58 -0700 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2008-10-16 17:50:58 -0700 |
commit | 4f288dd21d4ac2b86821ad6e010b0444f8285fa9 (patch) | |
tree | 6084284f6af06e6ea9a978864fa58e572e07babb | |
parent | e24cdf4969d5a6a4a0e6ba3cf43f3c3ddf4f8214 (diff) | |
download | libcap-4f288dd21d4ac2b86821ad6e010b0444f8285fa9.tar.gz |
Make rules were not complete for compiling on unprepared systems.
Reported-by: Ulf GrĂ¼ne <ulf.gruene@t-online.de>
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r-- | Make.Rules | 1 | ||||
-rw-r--r-- | libcap/Makefile | 2 | ||||
-rw-r--r-- | pam_cap/Makefile | 4 |
3 files changed, 4 insertions, 3 deletions
@@ -64,6 +64,7 @@ INCS=$(topdir)/libcap/include/sys/capability.h 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) # Global cleanup stuff LOCALCLEAN=rm -f *~ core diff --git a/libcap/Makefile b/libcap/Makefile index 2d95e69..6b7fcf2 100644 --- a/libcap/Makefile +++ b/libcap/Makefile @@ -33,7 +33,7 @@ cap_names.h: _makenames ./_makenames > cap_names.h $(GPERF_OUTPUT): cap_names.sed - sed -e 's/[\{\"]//g' -e 's/\}.*//' -e '1istruct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, unsigned int);\n%}\n%%' $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 | indent -kr > $@ + sed -e 's/[\{\"]//g' -e 's/\}.*//' -e '1istruct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, unsigned int);\n%}\n%%' $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@ cap_names.sed: Makefile $(KERNEL_HEADERS)/linux/capability.h @echo "=> making cap_names.c from <linux/capability.h>" diff --git a/pam_cap/Makefile b/pam_cap/Makefile index 6483790..eae88ed 100644 --- a/pam_cap/Makefile +++ b/pam_cap/Makefile @@ -14,13 +14,13 @@ install: all install -m 0755 pam_cap.so $(LIBDIR)/security pam_cap.so: pam_cap.o - $(LD) $(CFLAGS) -o pam_cap.so $< $(LDLIBS) + $(LD) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS) pam_cap.o: pam_cap.c $(CC) $(CFLAGS) -c $< -o $@ testcompile: test.c pam_cap.o - $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS) clean: rm -f *.o *.so testcompile *~ |