]> arthur.barton.de Git - bup.git/blob - Makefile
Add a 'bup' wrapper program.
[bup.git] / Makefile
1 CFLAGS=-Wall -g -O2 -Werror -I/usr/include/python2.5 -g -fwrapv -fPIC
2
3 default: all
4
5 all: bup-split bup-join bup datagen hashsplit.so
6
7 datagen: datagen.o
8
9 hashsplit.so: hashsplitmodule.o
10         $(CC) -shared -Wl,-Bsymbolic-functions -o $@ $<
11
12 test: all
13         ./bup split <testfile1 >tags1
14         ./bup split <testfile2 >tags2
15         diff -u tags1 tags2 || true
16         wc -c testfile1 testfile2
17         wc -l tags1 tags2
18         ./bup join <tags1 >out1
19         ./bup join <tags2 >out2
20         diff -u testfile1 out1
21         diff -u testfile2 out2
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 \
43                 bup bup-split bup-join datagen \
44                 out[12] tags[12]