blob: f548726e7695aabc36375877d5c4e06641669cce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
diff -Nura libcap-2.19.orig/Make.Rules libcap-2.19/Make.Rules
--- libcap-2.19.orig/Make.Rules 2010-01-13 23:04:58.000000000 -0300
+++ libcap-2.19/Make.Rules 2010-12-28 16:44:18.164052748 -0300
@@ -45,25 +45,26 @@
KERNEL_HEADERS := $(topdir)/libcap/include
IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
-CC := gcc
-CFLAGS := -O2
-BUILD_CC := $(CC)
-BUILD_CFLAGS := $(CFLAGS) $(IPATH)
-AR := ar
-RANLIB := ranlib
+CC ?= gcc
+CFLAGS ?= -O2
+CC_FOR_BUILD ?= $(CC)
+CFLAGS_FOR_BUILD ?= $(CFLAGS)
+AR ?= ar
+RANLIB ?= ranlib
DEBUG = -g #-DDEBUG
WARNINGS=-fPIC -Wall -Wwrite-strings \
-Wpointer-arith -Wcast-qual -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes \
-Wnested-externs -Winline -Wshadow
LD=$(CC) -Wl,-x -shared
-LDFLAGS := #-g
+LDFLAGS ?= #-g
SYSTEM_HEADERS = /usr/include
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)
+CFLAGS_FOR_BUILD += $(IPATH)
+PAM_CAP := no
INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
LIBATTR := yes
diff -Nura libcap-2.19.orig/libcap/Makefile libcap-2.19/libcap/Makefile
--- libcap-2.19.orig/libcap/Makefile 2008-12-04 05:03:12.000000000 -0200
+++ libcap-2.19/libcap/Makefile 2010-12-28 16:44:33.457052750 -0300
@@ -33,7 +33,7 @@
endif
_makenames: _makenames.c cap_names.list.h
- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
cap_names.h: _makenames
./_makenames > cap_names.h
@@ -65,7 +65,7 @@
install -m 0644 include/sys/capability.h $(INCDIR)/sys
mkdir -p -m 0755 $(LIBDIR)
install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME)
- install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
+ install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME)
ifeq ($(FAKEROOT),)
|