chiark / gitweb /
27969c14f319761ab1cf37b96cb43f9a4e55aff2
[chiark-utils.git] / settings.make
1 # Makefile
2 # common make settings
3 #
4 # This file is part of chiark-utils, a collection of useful utilities
5 #
6 # This file is:
7 #  Copyright (C) 1997-1998,2000-2001 Ian Jackson <ian@chiark.greenend.org.uk>
8 #
9 # This is free software; you can redistribute it and/or modify it under the
10 # terms of the GNU General Public License as published by the Free Software
11 # Foundation; either version 3, or (at your option) any later version.
12 #
13 # This is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
16 # details.
17 #
18 # You should have received a copy of the GNU General Public License along
19 # with this program; if not, consult the Free Software Foundation's
20 # website at www.fsf.org, or the GNU Project website at www.gnu.org.
21
22 CONFIG_CPPFLAGS=        -DRWBUFFER_SIZE_MB=$(RWBUFFER_SIZE_MB) \
23                         -DREALLY_CHECK_FILE='"/etc/inittab"' \
24                         -DREALLY_CHECK_FILE_2='"/etc/rc.local"'
25
26 CC=             gcc
27 CFLAGS=         $(WARNINGS) $(OPTIMISE) $(DEBUG) $(CMDLINE_CFLAGS)
28 CPPFLAGS=       $(CONFIG_CPPFLAGS) $(CMDLINE_CPPFLAGS)
29 LDFLAGS=        $(CMDLINE_LDFLAGS)
30
31 WARNINGS=       -Wall -Wwrite-strings -Wmissing-prototypes \
32                 -Wstrict-prototypes -Wpointer-arith -Wno-pointer-sign
33 OPTIMISE=       -O2
34 DEBUG=          -g
35
36 SYSTEM_GROUP=   root
37
38 prefix=/usr/local
39 etcdir=/etc
40 varlib=/var/lib
41
42 confdir=$(etcdir)/$(us)
43 bindir=$(prefix)/bin
44 sbindir=$(prefix)/sbin
45 sharedir=$(prefix)/share/$(us)
46 perl5dir=$(prefix)/share/perl5
47 txtdocdir=$(prefix)/share/doc/$(us)
48 python2dir=$(prefix)/lib/python2.7/dist-packages
49 python3dir=$(prefix)/lib/python3/dist-packages
50 exampledir=$(txtdocdir)/examples
51 vardir=$(varlib)/$(us)
52 mandir=${prefix}/man
53 man1dir=${mandir}/man1
54 man8dir=${mandir}/man8
55
56 # INSTALL_PROGRAM_STRIP_OPT=-s
57
58 INSTALL=                install -c
59 INSTALL_SHARE=          $(INSTALL) -m 644 -o root -g $(SYSTEM_GROUP)
60 INSTALL_SCRIPT=         $(INSTALL) -m 755 -o root -g $(SYSTEM_GROUP)
61 INSTALL_PROGRAM=        $(INSTALL_SCRIPT) $(INSTALL_PROGRAM_STRIP_OPT)
62 INSTALL_DIRECTORY=      $(INSTALL) -m 2755 -o root -g $(SYSTEM_GROUP) -d