]> arthur.barton.de Git - bup.git/blob - Makefile
'bup split' takes a list of filenames on the command line.
[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 randomgen hashsplit.so
6
7 randomgen: randomgen.o
8
9 hashsplit.so: hashsplitmodule.o
10         $(CC) -shared -o $@ $<
11         
12 runtests: all
13         ./wvtest.py $(wildcard t/t*.py)
14         
15 runtests-cmdline: all
16         @echo "Testing \"$@\" in Makefile:"
17         ./bup split -b <testfile1 >tags1
18         ./bup split -b testfile2 >tags2
19         diff -u tags1 tags2 || true
20         wc -c testfile1 testfile2
21         wc -l tags1 tags2
22         ./bup join <tags1 >out1
23         ./bup join <tags2 >out2
24         diff -u testfile1 out1
25         diff -u testfile2 out2
26         
27 test: all runtests-cmdline
28         ./wvtestrun $(MAKE) runtests
29
30 %: %.o
31         gcc -o $@ $< $(LDFLAGS) $(LIBS)
32         
33 bup: bup.py
34         rm -f $@
35         ln -s $^ $@
36         
37 bup-%: cmd-%.py
38         rm -f $@
39         ln -s $^ $@
40         
41 bup-%: cmd-%.sh
42         rm -f $@
43         ln -s $^ $@
44         
45 %.o: %.c
46         gcc -c -o $@ $^ $(CPPFLAGS) $(CFLAGS)
47
48 clean:
49         rm -f *.o *.so *~ .*~ *.pyc \
50                 bup bup-split bup-join randomgen \
51                 out[12] tags[12]