patch-Make_Rules 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --- libcap-2.24.orig/Make.Rules 2014-01-06 02:16:21.000000000 +0100
  2. +++ libcap-2.24/Make.Rules 2015-02-26 14:01:28.000000000 +0100
  3. @@ -12,22 +12,12 @@ FAKEROOT=$(DESTDIR)
  4. # These choices are motivated by the fact that getcap and setcap are
  5. # administrative operations that could be needed to recover a system.
  6. -ifndef lib
  7. -lib=$(shell ldd /usr/bin/ld|egrep "ld-linux|ld.so"|cut -d/ -f2)
  8. -endif
  9. -
  10. -ifdef prefix
  11. -exec_prefix=$(prefix)
  12. -lib_prefix=$(exec_prefix)
  13. -inc_prefix=$(lib_prefix)
  14. -man_prefix=$(prefix)/share
  15. -else
  16. +lib=lib
  17. prefix=/usr
  18. -exec_prefix=
  19. +exec_prefix=$(prefix)
  20. lib_prefix=$(exec_prefix)
  21. inc_prefix=$(prefix)
  22. man_prefix=$(prefix)/share
  23. -endif
  24. # Target directories
  25. @@ -48,28 +38,28 @@ MINOR=24
  26. KERNEL_HEADERS := $(topdir)/libcap/include/uapi
  27. IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
  28. -CC := gcc
  29. -CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
  30. +CC ?= gcc
  31. +CFLAGS ?= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
  32. BUILD_CC := $(CC)
  33. BUILD_CFLAGS := $(CFLAGS) $(IPATH)
  34. -AR := ar
  35. -RANLIB := ranlib
  36. -DEBUG = -g #-DDEBUG
  37. +AR ?= ar
  38. +RANLIB ?= ranlib
  39. +DEBUG =
  40. WARNINGS=-Wall -Wwrite-strings \
  41. -Wpointer-arith -Wcast-qual -Wcast-align \
  42. -Wstrict-prototypes -Wmissing-prototypes \
  43. -Wnested-externs -Winline -Wshadow
  44. -LD=$(CC) -Wl,-x -shared
  45. -LDFLAGS := #-g
  46. +LD=$(CC) -shared
  47. +LDFLAGS ?= #-g
  48. SYSTEM_HEADERS = /usr/include
  49. INCS=$(topdir)/libcap/include/sys/capability.h
  50. LDFLAGS += -L$(topdir)/libcap
  51. CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
  52. -PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
  53. +PAM_CAP := no
  54. INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
  55. DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
  56. -LIBATTR := yes
  57. +LIBATTR := no
  58. # When installing setcap, set its inheritable bit to be able to place
  59. # capabilities on files. It can be used in conjunction with pam_cap