~ubuntu-branches/ubuntu/oneiric/libcap2/oneiric

« back to all changes in this revision

Viewing changes to Make.Rules

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2008-03-29 10:19:58 UTC
  • Revision ID: james.westby@ubuntu.com-20080329101958-mi16dsb9fuzn1352
Tags: upstream-2.08
ImportĀ upstreamĀ versionĀ 2.08

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
## Optional prefixes:
 
3
#
 
4
 
 
5
# common 'packaging' directoty
 
6
 
 
7
FAKEROOT=$(DESTDIR)
 
8
 
 
9
# Autoconf-style prefixes are activated when $(prefix) is defined.
 
10
# Otherwise binaries and libraraies are installed in /{lib,sbin}/,
 
11
# header files in /usr/include/ and documentation in /usr/man/man?/.
 
12
 
 
13
ifndef lib
 
14
lib=lib
 
15
endif
 
16
 
 
17
ifdef prefix
 
18
exec_prefix=$(prefix)
 
19
lib_prefix=$(exec_prefix)
 
20
inc_prefix=$(lib_prefix)
 
21
man_prefix=$(prefix)/share
 
22
else
 
23
prefix=/usr
 
24
exec_prefix=
 
25
lib_prefix=$(exec_prefix)
 
26
inc_prefix=$(prefix)
 
27
man_prefix=$(prefix)/share
 
28
endif
 
29
 
 
30
# Target directories
 
31
 
 
32
MANDIR=$(FAKEROOT)$(man_prefix)/man
 
33
SBINDIR=$(FAKEROOT)$(exec_prefix)/sbin
 
34
INCDIR=$(FAKEROOT)$(inc_prefix)/include
 
35
LIBDIR=$(FAKEROOT)$(lib_prefix)/$(lib)
 
36
 
 
37
# common defines for libcap
 
38
LIBTITLE=libcap
 
39
VERSION=2
 
40
MINOR=08
 
41
#
 
42
 
 
43
# Compilation specifics
 
44
 
 
45
CC ?= gcc
 
46
AR ?= ar
 
47
RANLIB ?= ranlib
 
48
COPTFLAGS=-O2
 
49
DEBUG=-O2 -g #-DDEBUG
 
50
WARNINGS=-fPIC -Wall -Wwrite-strings \
 
51
        -Wpointer-arith -Wcast-qual -Wcast-align \
 
52
        -Wstrict-prototypes -Wmissing-prototypes \
 
53
        -Wnested-externs -Winline -Wshadow
 
54
LD=$(CC) -Wl,-x -shared
 
55
LDFLAGS=#-g
 
56
 
 
57
KERNEL_HEADERS = $(topdir)/libcap/include
 
58
SYSTEM_HEADERS = /usr/include
 
59
IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
 
60
INCS=$(topdir)/libcap/include/sys/capability.h
 
61
LIBS=-L$(topdir)/libcap -lcap
 
62
CFLAGS=-Dlinux $(WARNINGS) $(DEBUG) $(COPTFLAG) $(IPATH)
 
63
PAM_CAP ?= $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
 
64
# Global cleanup stuff
 
65
 
 
66
LOCALCLEAN=rm -f *~ core
 
67
DISTCLEAN=@find . \( -name '*.orig' -o -name '*.rej' \) | xargs rm -f
 
68
 
 
69
# Flags to pass down recursive makes
 
70
 
 
71
MAKE_DEFS = CC='$(CC)' CFLAGS='$(CFLAGS)' \
 
72
        LD='$(LD)' LIBS='$(LIBS)' LDFLAGS='$(LDFLAGS)' \
 
73
        VERSION='$(VERSION)' MINOR='$(MINOR)' \
 
74
        LIBDIR='$(LIBDIR)' INCDIR='$(INCDIR)' \
 
75
        SBINDIR='$(SBINDIR)' MANDIR='$(MANDIR)'