source: liacs/da/opdr2a/Makefile@ 99

Last change on this file since 99 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

File size: 1.7 KB
Line 
1CC = g++
2
3CompileParms = -c -Wall -Wno-deprecated -g
4
5OBJS = showlist.o leestekst.o testtrie.o
6BINARY = opdracht2a
7
8$(BINARY): $(OBJS)
9 $(CC) $(OBJS) -o $(BINARY)
10
11showlist.o: showlist.h showlist.cc
12 $(CC) $(CompileParms) showlist.cc
13
14leestekst.o: leestekst.h leestekst.cc
15 $(CC) $(CompileParms) leestekst.cc
16
17testtrie.o: general.h trie.h trie.cc showlist.h leestekst.h testtrie.cc
18 $(CC) $(CompileParms) testtrie.cc
19
20clean:
21 rm -f *.o $(BINARY)
22
23distclean: clean
24 rm -f *.uit
25
26debug: $(BINARY)
27 @sed 's/InterActief = 1/InterActief = 0/g' test.dat >test.dat.tmp
28 @mv test.dat.tmp test.dat
29 gdb -batch -x gdb.run ./$(BINARY)
30
31auto: $(BINARY)
32 @sed 's/InterActief = 1/InterActief = 0/g' test.dat >test.dat.tmp
33 @mv test.dat.tmp test.dat
34 sh -c "./$(BINARY) | grep -v '^ [2-8]' |\
35 sed 's/1. AtLeaf 9. PutInfo/--------------------/g' | cat -v"
36
37run: $(BINARY)
38 @sed 's/InterActief = 0/InterActief = 1/g' test.dat >test.dat.tmp
39 @mv test.dat.tmp test.dat
40 ./$(BINARY)
41
42test1: $(BINARY)
43 @echo "InterActief = 0" > test.dat
44 @echo "Invoer = test1.inv" >> test.dat
45 @echo "Controleren = 1" >> test.dat
46 @./$(BINARY) | tail -1 | grep -q "^GELIJK"
47
48test2: $(BINARY)
49 @echo "InterActief = 0" > test.dat
50 @echo "Invoer = test2.inv" >> test.dat
51 @echo "Controleren = 1" >> test.dat
52 @./$(BINARY) | tail -1 | grep -q "^GELIJK"
53
54test8: $(BINARY)
55 @echo "InterActief = 0" > test.dat
56 @echo "Invoer = test8.inv" >> test.dat
57 @echo "Controleren = 1" >> test.dat
58 @./$(BINARY) | tail -1 | grep -q "^GELIJK"
59
60test9: $(BINARY)
61 @echo "InterActief = 0" > test.dat
62 @echo "Invoer = test9.inv" >> test.dat
63 @echo "Controleren = 1" >> test.dat
64 @./$(BINARY) | tail -1 | grep -q "^GELIJK"
65
66test: $(BINARY)
67 make test1
68 make test2
Note: See TracBrowser for help on using the repository browser.