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.
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>
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.
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
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.
25 CFLAGS= $(WARNINGS) $(OPTIMISE) $(DEBUG)
26 CPPFLAGS= -DRWBUFFER_SIZE_MB=$(RWBUFFER_SIZE_MB)
28 WARNINGS= -Wall -Wwrite-strings -Wmissing-prototypes \
29 -Wstrict-prototypes -Wpointer-arith
38 confdir=$(etcdir)/chiark-backup
40 sharedir=$(prefix)/share/chiark-backup
41 txtdocdir=$(prefix)/share/doc/chiark-backup
42 exampledir=$(txtdocdir)/examples
43 vardir=$(varlib)/chiark-backup
46 INSTALL_SHARE= $(INSTALL) -m 644 -o root -g root
47 INSTALL_SCRIPT= $(INSTALL) -m 755 -o root -g root
48 INSTALL_PROGRAM= $(INSTALL_SCRIPT) -s
49 INSTALL_DIRECTORY= $(INSTALL) -m 2755 -o root -g root -d
51 CTARGETS= readbuffer writebuffer
52 BINSCRIPTS= checkallused loaded driver takedown whatsthis
53 SHARESCRIPTS= bringup full increm
54 SHAREFILES= backuplib.pl
56 EXAMPLES= relativity chiark
60 readbuffer: readbuffer.o rwbuffer.o
61 writebuffer: writebuffer.o rwbuffer.o
62 readbuffer.o writebuffer.o rwbuffer.o: rwbuffer.h
65 $(INSTALL_DIRECTORY) $(confdir) $(bindir) $(sharedir) $(vardir)
66 $(INSTALL_PROGRAM) $(CTARGETS) $(bindir)
67 set -e; for s in $(BINSCRIPTS); do \
68 $(INSTALL_SCRIPT) $$s $(bindir)/backup-$$s; done
69 $(INSTALL_SHARE) $(SHAREFILES) $(sharedir)
70 $(INSTALL_SCRIPT) $(SHARESCRIPTS) $(sharedir)
73 $(INSTALL_DIRECTORY) $(txtdocdir)
74 $(INSTALL_SHARE) iwjbackup.txt $(txtdocdir)/README
77 set -e; for e in $(EXAMPLES); do \
79 $(INSTALL_DIRECTORY) $(exampledir)/$$e; \
80 $(INSTALL_SHARE) [^A-Z]*[^~] $(exampledir)/$$e; \
81 if test -f SYMLINKS.tar; then \
83 (set -e; cd $(exampledir) && tar -xf -); \
91 distclean realclean: clean