]> arthur.barton.de Git - bup.git/blob - Makefile
Merge remote branch 'remotes/apenwarr-master/master'
[bup.git] / Makefile
1 PYINCLUDE:=$(shell python2.5-config --includes)
2 PYLIB:=$(shell python2.5-config --lib)
3 CFLAGS=-Wall -g -O2 -Werror $(PYINCLUDE) -g -fPIC
4
5 default: all
6
7 all: bup-split bup-join bup-save bup-init bup-server bup randomgen chashsplit.so
8
9 randomgen: randomgen.o
10
11 chashsplit.so: chashsplitmodule.o
12         $(CC) -shared -o $@ $< $(PYLIB)
13         
14 runtests: all
15         ./wvtest.py $(wildcard t/t*.py)
16         
17 runtests-cmdline: all
18         ./test-sh
19         
20 test: all runtests-cmdline
21         ./wvtestrun $(MAKE) runtests
22
23 %: %.o
24         gcc -o $@ $< $(LDFLAGS) $(LIBS)
25         
26 bup: bup.py
27         rm -f $@
28         ln -s $^ $@
29         
30 bup-%: cmd-%.py
31         rm -f $@
32         ln -s $^ $@
33         
34 bup-%: cmd-%.sh
35         rm -f $@
36         ln -s $^ $@
37         
38 %.o: %.c
39         gcc -c -o $@ $^ $(CPPFLAGS) $(CFLAGS)
40
41 clean:
42         rm -f *.o *.so *~ .*~ *.pyc */*.pyc */*~ \
43                 bup bup-* randomgen \
44                 out[12] out2[tc] tags[12] tags2[tc]
45         rm -rf *.tmp