]> arthur.barton.de Git - bup.git/blob - Makefile
Add a 'make stupid' target that does 'make test' with a minimal PATH.
[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 stupid:
21         PATH=/bin:/usr/bin $(MAKE) test
22         
23 test: all runtests-cmdline
24         ./wvtestrun $(MAKE) runtests
25
26 %: %.o
27         gcc -o $@ $< $(LDFLAGS) $(LIBS)
28         
29 bup: bup.py
30         rm -f $@
31         ln -s $^ $@
32         
33 bup-%: cmd-%.py
34         rm -f $@
35         ln -s $^ $@
36         
37 bup-%: cmd-%.sh
38         rm -f $@
39         ln -s $^ $@
40         
41 %.o: %.c
42         gcc -c -o $@ $^ $(CPPFLAGS) $(CFLAGS)
43
44 clean:
45         rm -f *.o *.so *~ .*~ *.pyc */*.pyc */*~ \
46                 bup bup-* randomgen \
47                 out[12] out2[tc] tags[12] tags2[tc]
48         rm -rf *.tmp