aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2008-09-10 19:50:50 -0700
committerAndrew G. Morgan <morgan@kernel.org>2008-09-10 19:50:50 -0700
commit8bdd0efea3a37bc87ce57f24b9e21a5391a6d8e1 (patch)
treece1bc557bd26c41e2b09d93ffb40a64f459bc5b1
parenteeb82e1ddcf5b75611fb4303675fc65f36bb51e7 (diff)
downloadlibcap-8bdd0efea3a37bc87ce57f24b9e21a5391a6d8e1.tar.gz
Restore correct source location for <sys/capability.h>
Reported-by: Robby Workman <rworkman@slackware.com> Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r--Make.Rules7
-rw-r--r--libcap/Makefile2
2 files changed, 5 insertions, 4 deletions
diff --git a/Make.Rules b/Make.Rules
index d597fde..d1a554f 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -42,10 +42,13 @@ MINOR=11
# Compilation specifics
+KERNEL_HEADERS := $(topdir)/libcap/include
+IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
+
CC := gcc
CFLAGS := -O2
BUILD_CC := $(CC)
-BUILD_CFLAGS := $(CFLAGS)
+BUILD_CFLAGS := $(CFLAGS) $(IPATH)
AR := ar
RANLIB := ranlib
DEBUG = -g #-DDEBUG
@@ -56,9 +59,7 @@ WARNINGS=-fPIC -Wall -Wwrite-strings \
LD=$(CC) -Wl,-x -shared
LDFLAGS := #-g
-KERNEL_HEADERS := $(topdir)/libcap/include
SYSTEM_HEADERS = /usr/include
-IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
INCS=$(topdir)/libcap/include/sys/capability.h
LDFLAGS += -L$(topdir)/libcap
CFLAGS += -Dlinux $(WARNINGS) $(DEBUG) $(IPATH)
diff --git a/libcap/Makefile b/libcap/Makefile
index da22bd1..2d95e69 100644
--- a/libcap/Makefile
+++ b/libcap/Makefile
@@ -37,7 +37,7 @@ $(GPERF_OUTPUT): cap_names.sed
cap_names.sed: Makefile $(KERNEL_HEADERS)/linux/capability.h
@echo "=> making cap_names.c from <linux/capability.h>"
- @sed -ne '/^#define[ \t]CAP[_A-Z]\+[ \t]\+[0-9]\+/{s/^#define \([^ \t]*\)[ \t]*\([^ \t]*\)/\{\"\1\",\2\},/;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;p;}' < $(KERNEL_HEADERS)/linux/capability.h | fgrep -v 0x > $@
+ sed -ne '/^#define[ \t]CAP[_A-Z]\+[ \t]\+[0-9]\+/{s/^#define \([^ \t]*\)[ \t]*\([^ \t]*\)/\{\"\1\",\2\},/;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;p;}' < $(KERNEL_HEADERS)/linux/capability.h | fgrep -v 0x > $@
$(STALIBNAME): $(OBJS)
$(AR) rcs $@ $^