chiark / gitweb /
working on trivsoundd
[chiark-utils.git] / cprogs / Makefile
1 # Makefile
2 # simple make settings
3 #
4 # This file is part of chiark backup, a system for backing up GNU/Linux and
5 # other UN*X-compatible machines, as used on chiark.greenend.org.uk.
6 #
7 # chiark backup is:
8 #  Copyright (C) 1997-1998,2000-2001 Ian Jackson <ian@chiark.greenend.org.uk>
9 #  Copyright (C) 1999 Peter Maydell <pmaydell@chiark.greenend.org.uk>
10 #
11 # This is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2, or (at your option) any later version.
14 #
15 # This is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
18 # details.
19 #
20 # You should have received a copy of the GNU General Public License along
21 # with this program; if not, write to the Free Software Foundation, Inc.,
22 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24 CC=             gcc
25 CFLAGS=         $(WARNINGS) $(OPTIMISE) $(DEBUG)
26 CPPFLAGS=       -DRWBUFFER_SIZE_MB=$(RWBUFFER_SIZE_MB)
27
28 WARNINGS=       -Wall -Wwrite-strings -Wmissing-prototypes \
29                 -Wstrict-prototypes -Wpointer-arith
30 OPTIMISE=       -O2
31 DEBUG=          -g
32 RWBUFFER_SIZE_MB=16
33
34 SYSTEM_GROUP=   root
35
36 prefix=/usr/local
37
38 bindir=$(prefix)/bin
39 sbindir=$(prefix)/sbin
40 mandir=${prefix}/man
41 man1dir=${mandir}/man1
42 man8dir=${mandir}/man8
43
44 INSTALL=                install -c
45 INSTALL_PROGRAM=        $(INSTALL_SCRIPT) -s
46
47 PROGRAMS=       readbuffer writebuffer
48 DAEMONS=        trivsoundd
49 MAN1PAGES=      readbuffer.1 writebuffer.1
50 MAN8PAGES=      trivsoundd.8
51
52 TARGETS=        $(PROGRAMS) $(DAEMONS)
53
54 all:            $(TARGETS)
55
56 readbuffer:                     readbuffer.o                    rwbuffer.o
57 writebuffer:                    writebuffer.o   wrbufcore.o     rwbuffer.o 
58 trivsoundd:                     trivsoundd.o    wrbufcore.o     rwbuffer.o 
59 readbuffer.o writebuffer.o rwbuffer.o wrbufcoore.o:     rwbuffer.h
60
61 install:                all
62                 $(INSTALL_DIRECTORY) $(bindir) $(sbindir)
63                 $(INSTALL_PROGRAM) $(PROGRAMS) $(bindir)
64                 $(INSTALL_PROGRAM) $(DAEMONS) $(sbindir)
65
66 install-docs:
67                 $(INSTALL_DIRECTORY) $(man1dir) $(man8dir) $(txtdocdir)
68                 $(INSTALL) -m 644 $(MAN1PAGES) ${man1dir}/.
69                 $(INSTALL) -m 644 $(MAN8PAGES) ${man8dir}/.
70
71 install-examples:
72
73 clean:
74                 rm -f *~ ./#*# *.o
75
76 distclean realclean:    clean
77                 rm -f $(TARGETS)