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
|
diff -ur libcap-1.10.orig/libcap/Makefile libcap-1.10/libcap/Makefile
--- libcap-1.10.orig/libcap/Makefile 2004-04-25 12:15:02.000000000 -0700
+++ libcap-1.10/libcap/Makefile 2004-04-25 12:40:47.000000000 -0700
@@ -34,6 +34,7 @@
#
LIBNAME=libcap
PYTHONMODNAME=libcapmodule.so
+STATLIBNAME=$(LIBNAME).a
#
FILES=cap_alloc cap_proc cap_extint cap_flag cap_text cap_sys
@@ -48,9 +49,9 @@
MINLIBNAME=$(MAJLIBNAME).$(MINOR)
ifdef PYTHON
-all: $(MINLIBNAME) $(LIBNAME).a $(PYTHONMODNAME)
+all: $(MINLIBNAME) $(STATLIBNAME) $(PYTHONMODNAME)
else
-all: $(MINLIBNAME) $(LIBNAME).a
+all: $(MINLIBNAME) $(STATLIBNAME)
endif
_makenames: _makenames.c cap_names.sed
@@ -63,8 +64,8 @@
@echo "=> making cap_names.c from <sys/capability.h>"
@sed -ne '/^#define[ \t]CAP[_A-Z]\+[ \t]\+[0-9]\+/{s/^#define \([^ \t]*\)[ \t]*\([^ \t]*\)/ \{ \2, \"\1\" \},/;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;p;}' < include/sys/capability.h | fgrep -v 0x > cap_names.sed # @sed -ne '/^#define[ \t]CAP[_A-Z]\+[ \t]\+[0-9]\+/{s/^#define CAP_\([^ \t]*\)[ \t]*\([^ \t]*\)/ \{ \2, \"\1\" \},/;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;p;}' < /usr/include/linux/capability.h | fgrep -v 0x > cap_names.sed
-$(LIBNAME).a: $(OBJS)
- ar cruv $(LIBNAME).a $(OBJS)
+$(STATLIBNAME): $(OBJS)
+ ar csruv $(STATLIBNAME) $(OBJS)
$(MINLIBNAME): $(LOBJS)
$(CC) -shared -fPIC -Wl,-soname,$(MAJLIBNAME) -o $@ $(LOBJS)
@@ -88,7 +89,7 @@
mkdir -p -m 0755 $(INCDIR)/sys
install -m 0644 include/sys/capability.h $(INCDIR)/sys
mkdir -p -m 0755 $(LIBDIR)
- install -m 0644 $(LIBNAME).a $(LIBDIR)
+ install -m 0644 $(STATLIBNAME) $(LIBDIR)
install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME).so
@@ -100,7 +101,10 @@
clean:
$(LOCALCLEAN)
- rm -f $(OBJS) $(LOBJS) $(LIBNAME).a $(LIBNAME).so*
+ rm -f $(OBJS) $(LOBJS) $(STATLIBNAME) $(LIBNAME).so*
rm -f cap_names.h cap_names.sed _makenames libcap_wrap.c
cd include/sys && $(LOCALCLEAN)
+ifdef PYTHON
+ rm libcap.py libcap_wrap.o libcapmodule.so
+endif
|