blob: b36f76afefcc1417db8003d2fab95ec8efb6c7a1 [file] [log] [blame]
Andrew Morgan2c9c0532007-07-10 20:50:21 -07001#
Andrew Morganf2e0a442007-07-10 20:58:05 -07002# $Id: Make.Rules,v 1.5 1999/11/18 06:06:02 morgan Exp $
Andrew Morgan2c9c0532007-07-10 20:50:21 -07003#
4
5#
6## Optional prefixes:
7#
8
9# common 'packaging' directoty
10
11FAKEROOT=
12
13# Autoconf-style prefixes are activated when $(prefix) is defined.
14# Otherwise binaries and libraraies are installed in /{lib,sbin}/,
15# header files in /usr/include/ and documentation in /usr/man/man?/.
16
17ifdef prefix
18exec_prefix=$(prefix)
19lib_prefix=$(exec_prefix)
20inc_prefix=$(lib_prefix)
21man_prefix=$(prefix)
22else
23prefix=/usr
24exec_prefix=
25lib_prefix=$(exec_prefix)
26inc_prefix=$(prefix)
27man_prefix=$(prefix)
28endif
29
30# Target directories
31
32MANDIR=$(FAKEROOT)$(man_prefix)/man
33SBINDIR=$(FAKEROOT)$(exec_prefix)/sbin
34INCDIR=$(FAKEROOT)$(inc_prefix)/include
35LIBDIR=$(FAKEROOT)$(lib_prefix)/lib
36
37# common defines for libcap (suitable for 2.2.1+ Linux kernels)
38VERSION=1
Andrew Morganf2e0a442007-07-10 20:58:05 -070039MINOR=10
Andrew Morgan2c9c0532007-07-10 20:50:21 -070040#
41
42# Compilation specifics
43
44CC=gcc
45COPTFLAGS=-O2
46DEBUG=-g #-DDEBUG
47WARNINGS=-ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
48 -Wpointer-arith -Wcast-qual -Wcast-align \
49 -Wtraditional -Wstrict-prototypes -Wmissing-prototypes \
50 -Wnested-externs -Winline -Wshadow -pedantic
51LD=ld
52LDFLAGS=-s #-g
53
54IPATH=-I$(topdir)/libcap/include
55INCS=$(topdir)/libcap/include/sys/capability.h
56LIBS=-L$(topdir)/libcap -lcap
57CFLAGS=-Dlinux $(WARNINGS) $(DEBUG) $(COPTFLAG) $(IPATH)
58
59# Global cleanup stuff
60
61LOCALCLEAN=rm -f *~ core
62DISTCLEAN=@find . \( -name '*.orig' -o -name '*.rej' \) | xargs rm -f
63
64# Flags to pass down recursive makes
65
66MAKE_DEFS = CC='$(CC)' CFLAGS='$(CFLAGS)' \
67 LD='$(LD)' LIBS='$(LIBS)' LDFLAGS='$(LDFLAGS)' \
68 VERSION='$(VERSION)' MINOR='$(MINOR)' \
69 LIBDIR='$(LIBDIR)' INCDIR='$(INCDIR)' \
70 SBINDIR='$(SBINDIR)' MANDIR='$(MANDIR)'