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