chiark / gitweb /
xduplic-copier: an attempt at correct library dependencies
[chiark-utils.git] / cprogs / Makefile
index a936e64..3dcc0e7 100644 (file)
@@ -27,11 +27,12 @@ include ../settings.make
 
 RWBUFFER_SIZE_MB=16
 
-PROGRAMS=              readbuffer writebuffer with-lock-ex xacpi-simple \
-                       summer watershed rcopy-repeatedly
+PROGRAMS=              readbuffer writebuffer with-lock-ex xbatmon-simple \
+                       summer watershed rcopy-repeatedly xduplic-copier
 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
 BUILTTXTDOCS=          watershed.txt
 TXTDOCS=               $(BUILTTXTDOCS)
@@ -48,17 +49,19 @@ 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
 
-xacpi-simple:  xacpi-simple.o
-               $(CC) -o $@ $< -L/usr/X11R6/lib -lX11 -lm
+xbatmon-simple: LDLIBS += -lX11 -lm
+
+xduplic-copier: LDLIBS += -lXmu -lSM -lICE -lXt -lXext
+xduplic-copier: LDLIBS += -lX11 -lxcb -lXau -lXdmcmp
 
 summer:                summer.o
-               $(CC) -o $@ $< -lnettle -lgmp
+summer:                LDLIBS += -lnettle -lgmp
 
 rcopy-repeatedly: rcopy-repeatedly.o myopt.o
-               $(CC) -o $@ $^ -lm -lrt
+rcopy-repeatedly: LDLIBS += -lm -lrt
 
 watershed:     watershed.o
-               $(CC) -o $@ $< -lnettle -lgmp
+watershed:     LDLIBS += -lnettle -lgmp
 
 watershed.txt: watershed.c
                sed '/^$$/,$$d' <$^ >$@.new && mv -f $@.new $@
@@ -79,7 +82,7 @@ install-docs: watershed.txt
 install-examples:
 
 clean:
-               rm -f *~ ./#*# *.o
+               rm -f *~ ./#*# *.o $(PROGRAMS)
 
 distclean realclean:   clean
                rm -f $(TARGETS)