-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.sh
+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)
-%: %.sh
+bup: bup.py
+ rm -f $@
+ ln -s $^ $@
+
+bup-%: cmd-%.py
+ rm -f $@
+ ln -s $^ $@
+
+bup-%: cmd-%.sh
rm -f $@
ln -s $^ $@
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