chiark / gitweb /
xduplic-copier: manpage
[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 3, 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, consult the Free Software Foundation's
22 # website at www.fsf.org, or the GNU Project website at www.gnu.org.
23
24 us=     chiark-utils-bin
25
26 include ../settings.make
27
28 RWBUFFER_SIZE_MB=16
29
30 PROGRAMS=               readbuffer writebuffer with-lock-ex xbatmon-simple \
31                         summer watershed rcopy-repeatedly xduplic-copier
32 SUIDSBINPROGRAMS=       really
33 DAEMONS=                trivsoundd
34 MAN1PAGES=              readbuffer.1 writebuffer.1 with-lock-ex.1 \
35                         xduplic-copier.1
36 MAN8PAGES=              trivsoundd.8 really.8
37 BUILTTXTDOCS=           watershed.txt
38 TXTDOCS=                $(BUILTTXTDOCS)
39
40 TARGETS=        $(PROGRAMS) $(SUIDSBINPROGRAMS) $(DAEMONS) $(BUILTTXTDOCS)
41
42 all:            $(TARGETS)
43
44 readbuffer:                     readbuffer.o                    rwbuffer.o
45 writebuffer:                    writebuffer.o   wrbufcore.o     rwbuffer.o 
46 trivsoundd:                     trivsoundd.o    wrbufcore.o     rwbuffer.o 
47 really:                         really.o myopt.o
48
49 really.o myopt.o rcopy-repeatedly.o: myopt.h
50 readbuffer.o writebuffer.o rwbuffer.o wrbufcore.o trivsoundd.o: rwbuffer.h
51
52 xbatmon-simple: LDLIBS += -lX11 -lm
53
54 xduplic-copier: LDLIBS += -lXmu
55
56 summer:         summer.o
57                 $(CC) -o $@ $< -lnettle -lgmp
58
59 rcopy-repeatedly: rcopy-repeatedly.o myopt.o
60                 $(CC) -o $@ $^ -lm -lrt
61
62 watershed:      watershed.o
63                 $(CC) -o $@ $< -lnettle -lgmp
64
65 watershed.txt:  watershed.c
66                 sed '/^$$/,$$d' <$^ >$@.new && mv -f $@.new $@
67
68 install:                all
69                 $(INSTALL_DIRECTORY) $(bindir) $(sbindir)
70                 $(INSTALL_PROGRAM) $(PROGRAMS) $(bindir)
71                 $(INSTALL_PROGRAM) $(DAEMONS) $(sbindir)
72                 $(INSTALL) -m 4774 -o root -g $(SYSTEM_GROUP) \
73                         $(SUIDSBINPROGRAMS) $(sbindir)
74
75 install-docs:   watershed.txt
76                 $(INSTALL_DIRECTORY) $(man1dir) $(man8dir) $(txtdocdir)
77                 $(INSTALL) -m 644 $(MAN1PAGES) ${man1dir}/.
78                 $(INSTALL) -m 644 $(MAN8PAGES) ${man8dir}/.
79                 $(INSTALL) -m 644 $(TXTDOCS) ${txtdocdir}/.
80
81 install-examples:
82
83 clean:
84                 rm -f *~ ./#*# *.o $(PROGRAMS)
85
86 distclean realclean:    clean
87                 rm -f $(TARGETS)