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