chiark / gitweb /
hexterm
[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 include ../settings.make
25
26 RWBUFFER_SIZE_MB=16
27
28 PROGRAMS=               readbuffer writebuffer with-lock-ex xacpi-simple \
29                         summer
30 SUIDSBINPROGRAMS=       really
31 DAEMONS=                trivsoundd
32 MAN1PAGES=              readbuffer.1 writebuffer.1 with-lock-ex.1
33 MAN8PAGES=              trivsoundd.8 really.8
34
35 TARGETS=        $(PROGRAMS) $(SUIDSBINPROGRAMS) $(DAEMONS)
36
37 all:            $(TARGETS)
38
39 readbuffer:                     readbuffer.o                    rwbuffer.o
40 writebuffer:                    writebuffer.o   wrbufcore.o     rwbuffer.o 
41 trivsoundd:                     trivsoundd.o    wrbufcore.o     rwbuffer.o 
42 really:                         really.o myopt.o
43
44 really.o myopt.o: myopt.h
45 readbuffer.o writebuffer.o rwbuffer.o wrbufcore.o trivsoundd.o: rwbuffer.h
46
47 xacpi-simple:   xacpi-simple.o
48                 $(CC) -o $@ $< -L/usr/X11R6/lib -lX11 -lm
49
50 summer:         summer.o
51                 $(CC) -o $@ $< -lnettle
52
53 install:                all
54                 $(INSTALL_DIRECTORY) $(bindir) $(sbindir)
55                 $(INSTALL_PROGRAM) $(PROGRAMS) $(bindir)
56                 $(INSTALL_PROGRAM) $(DAEMONS) $(sbindir)
57                 $(INSTALL) -m 4774 -o root -g $(SYSTEM_GROUP) \
58                         $(SUIDSBINPROGRAMS) $(sbindir)
59
60 install-docs:
61                 $(INSTALL_DIRECTORY) $(man1dir) $(man8dir) $(txtdocdir)
62                 $(INSTALL) -m 644 $(MAN1PAGES) ${man1dir}/.
63                 $(INSTALL) -m 644 $(MAN8PAGES) ${man8dir}/.
64
65 install-examples:
66
67 clean:
68                 rm -f *~ ./#*# *.o
69
70 distclean realclean:    clean
71                 rm -f $(TARGETS)