]> arthur.barton.de Git - bup.git/blob - Makefile
datagen.c: a quick program to generate a repeatable series of bytes.
[bup.git] / Makefile
1 CFLAGS=-Wall -g -Werror
2
3 default: all
4
5 all: hashsplit hashjoin datagen
6
7 hashsplit: hashsplit.o
8
9 datagen: datagen.o
10
11 hashjoin: hashjoin.sh
12
13 test: hashsplit hashjoin
14         ./hashsplit.py <testfile1 >tags1
15         ./hashsplit.py <testfile2 >tags2
16         diff -u tags1 tags2 || true
17         wc -c testfile1 testfile2
18         wc -l tags1 tags2
19         ./hashjoin <tags1 >out1
20         ./hashjoin <tags2 >out2
21         diff -u testfile1 out1
22         diff -u testfile2 out2
23
24 %: %.o
25         gcc -o $@ $< $(LDFLAGS) $(LIBS)
26         
27 %: %.sh
28         rm -f $@
29         ln -s $^ $@
30         
31 %.o: %.c
32         gcc -c -o $@ $^ $(CPPFLAGS) $(CFLAGS)
33
34 clean:
35         rm -f *.o *~ hashsplit hashjoin hsplit hjoin datagen \
36                 out[12] tags[12] .*~