]> arthur.barton.de Git - bup.git/blobdiff - Makefile
Extremely basic 'bup server' support.
[bup.git] / Makefile
index f1e713cd63d3a6e86ad78c155d7f69e2b0797502..e19cd3b00215ef75a82e2f73a4186f073c2d12a7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,43 @@
-CFLAGS=-Wall -g -Werror
+CFLAGS=-Wall -g -O2 -Werror -I/usr/include/python2.5 -g -fPIC
 
-all: hsplit
+default: all
 
-hsplit: hsplit.o
+all: bup-split bup-join bup-save bup-init bup-server bup randomgen chashsplit.so
 
-hjoin: hjoin.o
+randomgen: randomgen.o
 
-test: hsplit
-       ./hsplit <testfile1 >tags1
-       ./hsplit <testfile2 >tags2
-       diff -u -U50 tags1 tags2
+chashsplit.so: chashsplitmodule.o
+       $(CC) -shared -o $@ $<
+       
+runtests: all
+       ./wvtest.py $(wildcard t/t*.py)
+       
+runtests-cmdline: all
+       ./test-sh
+       
+test: all runtests-cmdline
+       ./wvtestrun $(MAKE) runtests
 
 %: %.o
        gcc -o $@ $< $(LDFLAGS) $(LIBS)
        
+bup: bup.py
+       rm -f $@
+       ln -s $^ $@
+       
+bup-%: cmd-%.py
+       rm -f $@
+       ln -s $^ $@
+       
+bup-%: cmd-%.sh
+       rm -f $@
+       ln -s $^ $@
+       
 %.o: %.c
        gcc -c -o $@ $^ $(CPPFLAGS) $(CFLAGS)
 
 clean:
-       rm -f *.o *~ hsplit hjoin
+       rm -f *.o *.so *~ .*~ *.pyc */*.pyc */*~ \
+               bup bup-* randomgen \
+               out[12] out2[tc] tags[12] tags2[tc]
+       rm -rf *.tmp