chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cprogs: Saner build runes for summer, watershed and rcopy-repeatedly
[chiark-utils.git]
/
cprogs
/
Makefile
diff --git
a/cprogs/Makefile
b/cprogs/Makefile
index e9f19e01bc7f12caeb9d8a3f4c59be337acc0833..549b13e20a92fac284f8bc1d4ea1e369ec5afe5f 100644
(file)
--- a/
cprogs/Makefile
+++ b/
cprogs/Makefile
@@
-21,18
+21,23
@@
# with this program; if not, consult the Free Software Foundation's
# website at www.fsf.org, or the GNU Project website at www.gnu.org.
# with this program; if not, consult the Free Software Foundation's
# website at www.fsf.org, or the GNU Project website at www.gnu.org.
+us= chiark-utils-bin
+
include ../settings.make
RWBUFFER_SIZE_MB=16
include ../settings.make
RWBUFFER_SIZE_MB=16
-PROGRAMS= readbuffer writebuffer with-lock-ex x
acpi
-simple \
- summer watershed rcopy-repeatedly
+PROGRAMS= readbuffer writebuffer with-lock-ex x
batmon
-simple \
+ summer watershed rcopy-repeatedly
xduplic-copier
SUIDSBINPROGRAMS= really
DAEMONS= trivsoundd
SUIDSBINPROGRAMS= really
DAEMONS= trivsoundd
-MAN1PAGES= readbuffer.1 writebuffer.1 with-lock-ex.1
+MAN1PAGES= readbuffer.1 writebuffer.1 with-lock-ex.1 \
+ xduplic-copier.1
MAN8PAGES= trivsoundd.8 really.8
MAN8PAGES= trivsoundd.8 really.8
+BUILTTXTDOCS= watershed.txt
+TXTDOCS= $(BUILTTXTDOCS)
-TARGETS= $(PROGRAMS) $(SUIDSBINPROGRAMS) $(DAEMONS)
+TARGETS= $(PROGRAMS) $(SUIDSBINPROGRAMS) $(DAEMONS)
$(BUILTTXTDOCS)
all: $(TARGETS)
all: $(TARGETS)
@@
-44,17
+49,21
@@
really: really.o myopt.o
really.o myopt.o rcopy-repeatedly.o: myopt.h
readbuffer.o writebuffer.o rwbuffer.o wrbufcore.o trivsoundd.o: rwbuffer.h
really.o myopt.o rcopy-repeatedly.o: myopt.h
readbuffer.o writebuffer.o rwbuffer.o wrbufcore.o trivsoundd.o: rwbuffer.h
-xacpi-simple: xacpi-simple.o
- $(CC) -o $@ $< -L/usr/X11R6/lib -lX11 -lm
+xbatmon-simple: LDLIBS += -lX11 -lm
+
+xduplic-copier: LDLIBS += -lXmu
summer: summer.o
summer: summer.o
-
$(CC) -o $@ $<
-lnettle -lgmp
+
summer: LDLIBS +=
-lnettle -lgmp
rcopy-repeatedly: rcopy-repeatedly.o myopt.o
rcopy-repeatedly: rcopy-repeatedly.o myopt.o
-
$(CC) -o $@ $^
-lm -lrt
+
rcopy-repeatedly: LDLIBS +=
-lm -lrt
watershed: watershed.o
watershed: watershed.o
- $(CC) -o $@ $< -lnettle -lgmp
+watershed: LDLIBS += -lnettle -lgmp
+
+watershed.txt: watershed.c
+ sed '/^$$/,$$d' <$^ >$@.new && mv -f $@.new $@
install: all
$(INSTALL_DIRECTORY) $(bindir) $(sbindir)
install: all
$(INSTALL_DIRECTORY) $(bindir) $(sbindir)
@@
-63,15
+72,16
@@
install: all
$(INSTALL) -m 4774 -o root -g $(SYSTEM_GROUP) \
$(SUIDSBINPROGRAMS) $(sbindir)
$(INSTALL) -m 4774 -o root -g $(SYSTEM_GROUP) \
$(SUIDSBINPROGRAMS) $(sbindir)
-install-docs:
+install-docs:
watershed.txt
$(INSTALL_DIRECTORY) $(man1dir) $(man8dir) $(txtdocdir)
$(INSTALL) -m 644 $(MAN1PAGES) ${man1dir}/.
$(INSTALL) -m 644 $(MAN8PAGES) ${man8dir}/.
$(INSTALL_DIRECTORY) $(man1dir) $(man8dir) $(txtdocdir)
$(INSTALL) -m 644 $(MAN1PAGES) ${man1dir}/.
$(INSTALL) -m 644 $(MAN8PAGES) ${man8dir}/.
+ $(INSTALL) -m 644 $(TXTDOCS) ${txtdocdir}/.
install-examples:
clean:
install-examples:
clean:
- rm -f *~ ./#*# *.o
+ rm -f *~ ./#*# *.o
$(PROGRAMS)
distclean realclean: clean
rm -f $(TARGETS)
distclean realclean: clean
rm -f $(TARGETS)