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 " @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