|
Packit Service |
410935 |
#
|
|
Packit Service |
410935 |
## Optional prefixes:
|
|
Packit Service |
410935 |
#
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
# common 'packaging' directoty
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
FAKEROOT=$(DESTDIR)
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
# Autoconf-style prefixes are activated when $(prefix) is defined.
|
|
Packit Service |
410935 |
# Otherwise binaries and libraries are installed in /{lib,sbin}/,
|
|
Packit Service |
410935 |
# header files in /usr/include/ and documentation in /usr/man/man?/.
|
|
Packit Service |
410935 |
# These choices are motivated by the fact that getcap and setcap are
|
|
Packit Service |
410935 |
# administrative operations that could be needed to recover a system.
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
ifndef lib
|
|
Packit Service |
410935 |
lib=$(shell ldd /usr/bin/ld|egrep "ld-linux|ld.so"|cut -d/ -f2)
|
|
Packit Service |
410935 |
endif
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
ifdef prefix
|
|
Packit Service |
410935 |
exec_prefix=$(prefix)
|
|
Packit Service |
410935 |
lib_prefix=$(exec_prefix)
|
|
Packit Service |
410935 |
inc_prefix=$(lib_prefix)
|
|
Packit Service |
410935 |
man_prefix=$(prefix)/share
|
|
Packit Service |
410935 |
else
|
|
Packit Service |
410935 |
prefix=/usr
|
|
Packit Service |
410935 |
exec_prefix=
|
|
Packit Service |
410935 |
lib_prefix=$(exec_prefix)
|
|
Packit Service |
410935 |
inc_prefix=$(prefix)
|
|
Packit Service |
410935 |
man_prefix=$(prefix)/share
|
|
Packit Service |
410935 |
endif
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
# Target directories
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
MANDIR=$(man_prefix)/man
|
|
Packit Service |
410935 |
SBINDIR=$(exec_prefix)/sbin
|
|
Packit Service |
410935 |
INCDIR=$(inc_prefix)/include
|
|
Packit Service |
410935 |
LIBDIR=$(lib_prefix)/$(lib)
|
|
Packit Service |
410935 |
PKGCONFIGDIR=$(prefix)/$(lib)/pkgconfig
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
# common defines for libcap
|
|
Packit Service |
410935 |
LIBTITLE=libcap
|
|
Packit Service |
410935 |
VERSION=2
|
|
Packit Service |
410935 |
MINOR=26
|
|
Packit Service |
410935 |
#
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
# Compilation specifics
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
KERNEL_HEADERS := $(topdir)/libcap/include/uapi
|
|
Packit Service |
410935 |
IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
CC := gcc
|
|
Packit Service |
d15356 |
CFLAGS := $(RPM_OPT_FLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
Packit Service |
d15356 |
|
|
Packit Service |
410935 |
BUILD_CC := $(CC)
|
|
Packit Service |
410935 |
BUILD_CFLAGS := $(CFLAGS) $(IPATH)
|
|
Packit Service |
410935 |
AR := ar
|
|
Packit Service |
410935 |
RANLIB := ranlib
|
|
Packit Service |
410935 |
DEBUG = -g #-DDEBUG
|
|
Packit Service |
410935 |
WARNINGS=-Wall -Wwrite-strings \
|
|
Packit Service |
410935 |
-Wpointer-arith -Wcast-qual -Wcast-align \
|
|
Packit Service |
410935 |
-Wstrict-prototypes -Wmissing-prototypes \
|
|
Packit Service |
410935 |
-Wnested-externs -Winline -Wshadow
|
|
Packit Service |
410935 |
LD=$(CC) -Wl,-x -shared
|
|
Packit Service |
d15356 |
LDFLAGS := $(RPM_LD_FLAGS) #-g
|
|
Packit Service |
410935 |
BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
SYSTEM_HEADERS = /usr/include
|
|
Packit Service |
410935 |
INCS=$(topdir)/libcap/include/sys/capability.h
|
|
Packit Service |
410935 |
LDFLAGS += -L$(topdir)/libcap
|
|
Packit Service |
410935 |
CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
|
|
Packit Service |
410935 |
PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
|
|
Packit Service |
410935 |
INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
|
|
Packit Service |
410935 |
DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
# When installing setcap, set its inheritable bit to be able to place
|
|
Packit Service |
410935 |
# capabilities on files. It can be used in conjunction with pam_cap
|
|
Packit Service |
410935 |
# (associated with su and certain users say) to make it useful for
|
|
Packit Service |
410935 |
# specially blessed users. If you wish to drop this install feature,
|
|
Packit Service |
410935 |
# use this command when running install
|
|
Packit Service |
410935 |
#
|
|
Packit Service |
410935 |
# make RAISE_SETFCAP=no install
|
|
Packit Service |
410935 |
#
|
|
Packit Service |
410935 |
RAISE_SETFCAP := yes
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
# Global cleanup stuff
|
|
Packit Service |
410935 |
|
|
Packit Service |
410935 |
LOCALCLEAN=rm -f *~ core
|
|
Packit Service |
410935 |
DISTCLEAN=@find . \( -name '*.orig' -o -name '*.rej' \) | xargs rm -f
|