summaryrefslogtreecommitdiff
path: root/package/libcap/patches/patch-Make_Rules
blob: 4c909e150a8e985ce9c5c87b493c71b6ccdaca50 (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
--- libcap-2.25.orig/Make.Rules	2016-01-31 02:14:53.000000000 +0100
+++ libcap-2.25/Make.Rules	2016-09-26 20:46:02.214228217 +0200
@@ -13,21 +13,14 @@ FAKEROOT=$(DESTDIR)
 # administrative operations that could be needed to recover a system.
 
 ifndef lib
-lib=$(shell ldd /usr/bin/ld|egrep "ld-linux|ld.so"|cut -d/ -f2)
+lib=lib
 endif
 
-ifdef prefix
-exec_prefix=$(prefix)
-lib_prefix=$(exec_prefix)
-inc_prefix=$(lib_prefix)
-man_prefix=$(prefix)/share
-else
 prefix=/usr
-exec_prefix=
+exec_prefix=$(prefix)
 lib_prefix=$(exec_prefix)
 inc_prefix=$(prefix)
 man_prefix=$(prefix)/share
-endif
 
 # Target directories
 
@@ -48,10 +41,10 @@ MINOR=25
 KERNEL_HEADERS := $(topdir)/libcap/include/uapi
 IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
 
-CC := gcc
-CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-BUILD_CC := $(CC)
-BUILD_CFLAGS := $(CFLAGS) $(IPATH)
+CC ?= gcc
+CFLAGS ?= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+BUILD_CC := $(CC_FOR_BUILD)
+BUILD_CFLAGS := $(CFLAGS_FOR_BUILD) $(IPATH)
 AR := ar
 RANLIB := ranlib
 DEBUG = -g #-DDEBUG