| 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 <[email protected]> |
| 9 |
# Copyright (C) 1999 Peter Maydell <[email protected]> |
| 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 |
prefork-interp cgi-fcgi-interp |
| 33 |
SUIDSBINPROGRAMS= really |
| 34 |
DAEMONS= trivsoundd |
| 35 |
MAN1PAGES= readbuffer.1 writebuffer.1 with-lock-ex.1 \ |
| 36 |
xduplic-copier.1 summer.1 |
| 37 |
MAN8PAGES= trivsoundd.8 really.8 |
| 38 |
SEDDERYDOCS= watershed.txt prefork-interp.txt cgi-fcgi-interp.txt \ |
| 39 |
xbatmon-simple.txt rcopy-repeatedly.txt |
| 40 |
BUILTTXTDOCS= $(SEDDERYDOCS) |
| 41 |
TXTDOCS= $(BUILTTXTDOCS) |
| 42 |
|
| 43 |
acctdump_cc_out:=$(shell \ |
| 44 |
printf "\#include <sys/types.h>\n\#include <sys/acct.h>" \ |
| 45 |
| $(CC) -E - 2>&1 >/dev/null \ |
| 46 |
) |
| 47 |
ifeq (,$(acctdump_cc_out)) |
| 48 |
PROGRAMS+=acctdump |
| 49 |
MAN8PAGES+=acctdump.8 |
| 50 |
else |
| 51 |
$(warning Not building acctdump: $(acctdump_cc_out)) |
| 52 |
endif |
| 53 |
|
| 54 |
TARGETS= $(PROGRAMS) $(SUIDSBINPROGRAMS) $(DAEMONS) $(BUILTTXTDOCS) |
| 55 |
|
| 56 |
all: $(TARGETS) |
| 57 |
|
| 58 |
readbuffer: readbuffer.o rwbuffer.o |
| 59 |
writebuffer: writebuffer.o wrbufcore.o rwbuffer.o |
| 60 |
trivsoundd: trivsoundd.o wrbufcore.o rwbuffer.o |
| 61 |
really: really.o myopt.o |
| 62 |
acctdump: acctdump.o myopt.o |
| 63 |
|
| 64 |
acctdump.o really.o myopt.o rcopy-repeatedly.o: myopt.h |
| 65 |
cgi-cfgi-interp.o prefork.o: myopt.h prefork.h timespeccmp.h |
| 66 |
readbuffer.o writebuffer.o rwbuffer.o wrbufcore.o trivsoundd.o: rwbuffer.h |
| 67 |
|
| 68 |
xbatmon-simple: LDLIBS += -lX11 -lm |
| 69 |
|
| 70 |
xduplic-copier: LDLIBS += -lXmu -lX11 |
| 71 |
#xduplic-copier: LDLIBS += -lXmu -lSM -lICE -lXt -lXext |
| 72 |
#xduplic-copier: LDLIBS += -lX11 -lxcb -lXau -lXdmcp |
| 73 |
|
| 74 |
summer: summer.o |
| 75 |
summer: LDLIBS += -lnettle -lgmp |
| 76 |
|
| 77 |
rcopy-repeatedly: rcopy-repeatedly.o myopt.o |
| 78 |
rcopy-repeatedly: LDLIBS += -lm -lrt |
| 79 |
|
| 80 |
watershed: watershed.o common.o |
| 81 |
watershed: LDLIBS += -lnettle -lgmp |
| 82 |
|
| 83 |
cgi-fcgi-interp: cgi-fcgi-interp.o prefork.o myopt.o common.o |
| 84 |
cgi-fcgi-interp: LDLIBS += -lnettle |
| 85 |
|
| 86 |
prefork-interp: prefork-interp.o prefork.o myopt.o common.o |
| 87 |
prefork-interp: LDLIBS += -lnettle -luv |
| 88 |
|
| 89 |
$(SEDDERYDOCS): %.txt: %.c |
| 90 |
sed '/^$$/,$$d' <$^ >[email protected] && mv -f [email protected] $@ |
| 91 |
|
| 92 |
install: all |
| 93 |
$(INSTALL_DIRECTORY) $(bindir) $(sbindir) |
| 94 |
$(INSTALL_PROGRAM) $(PROGRAMS) $(bindir) |
| 95 |
$(INSTALL_PROGRAM) $(DAEMONS) $(sbindir) |
| 96 |
$(INSTALL) -m 4774 -o $(SYSTEM_USER) -g $(SYSTEM_GROUP) \ |
| 97 |
$(SUIDSBINPROGRAMS) $(sbindir) |
| 98 |
|
| 99 |
install-docs: $(TXTDOCS) |
| 100 |
$(INSTALL_DIRECTORY) $(man1dir) $(man8dir) $(txtdocdir) |
| 101 |
$(INSTALL) -m 644 $(MAN1PAGES) ${man1dir}/. |
| 102 |
$(INSTALL) -m 644 $(MAN8PAGES) ${man8dir}/. |
| 103 |
$(INSTALL) -m 644 $(TXTDOCS) ${txtdocdir}/. |
| 104 |
|
| 105 |
install-examples: |
| 106 |
|
| 107 |
clean: |
| 108 |
rm -f *~ ./#*# *.o $(PROGRAMS) |
| 109 |
|
| 110 |
distclean realclean: clean |
| 111 |
rm -f $(TARGETS) |