]> arthur.barton.de Git - bup.git/blob - Makefile
Add a trivial hjoin, the reverse of hsplit.
[bup.git] / Makefile
1 CFLAGS=-Wall -g -Werror
2
3 all: hsplit
4
5 hsplit: hsplit.o
6
7 hjoin: hjoin.sh
8
9 test: hsplit hjoin
10         ./hsplit <testfile1 >tags1
11         ./hsplit <testfile2 >tags2
12         diff -u -U50 tags1 tags2 || true
13         wc -c testfile1 testfile2
14         wc -l tags1 tags2
15         ./hjoin <tags1 >out1
16         ./hjoin <tags2 >out2
17         diff -u testfile1 out1
18         diff -u testfile2 out2
19
20 %: %.o
21         gcc -o $@ $< $(LDFLAGS) $(LIBS)
22         
23 %: %.sh
24         rm -f $@
25         ln -s $^ $@
26         
27 %.o: %.c
28         gcc -c -o $@ $^ $(CPPFLAGS) $(CFLAGS)
29
30 clean:
31         rm -f *.o *~ hsplit hjoin