* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / contrib / vmlog / maintain.mk
1 VERSION=0.0.5
2 RELEASENAME=vmlog-$(VERSION)
3 TARBALL=releases/$(RELEASENAME).tar.gz
4
5 CFLAGS=-g -ansi -std=c99 -pedantic -Wall -Wno-long-long -Wno-unused-function -I/home/edwin/local/classpath/include
6 #CFLAGS_TOOL=-O2 -DNDEBUG -ansi -std=c99 -march=pentium4m -pedantic -Wall -Wno-long-long
7 CFLAGS_TOOL=-g3 -pedantic -ansi -std=c99 -Wall -Wno-long-long -Wno-unused-function
8
9 all: vmlog.o vmlogdump vmlogindex vmlogdiff
10
11 runtests: t/hash.run t/memdup.run t/string.run t/threadhash.run t/file.run t/log.run t/concat.run t/ring.run t/opt.run t/tags.run
12
13 test: cleantests runtests
14         cat TESTRESULTS
15
16 cleantests:
17         @rm -f TESTIDX TESTSTR TESTLOG? TESTFILE TESTRESULTS
18         
19 %.run: %.c t/prolog.h vmlog.c vmlog.h
20         $(CC) $(CFLAGS) -I. -o $* $<
21         echo $* >>TESTRESULTS
22         { $* || echo "FAILED: exitcode == $$?" ; } | uniq -c >>TESTRESULTS
23
24 vmlogdump: vmlogdump.c vmlog.c vmlog.h
25         $(CC) $(CFLAGS_TOOL) -o $@ vmlogdump.c vmlog.c
26 vmlogindex: vmlogindex.c vmlog.c vmlog.h
27         $(CC) $(CFLAGS_TOOL) -o $@ vmlogindex.c vmlog.c
28 vmlogdiff: vmlogdiff.c vmlog.c vmlog.h
29         $(CC) $(CFLAGS_TOOL) -o $@ vmlogdiff.c vmlog.c
30
31 cscope:
32         cscope -b *.[ch] t/*.[ch]
33
34 clean: cleantests
35         rm -f *.o
36         rm -f vmlogdump vmlogindex vmlogdiff
37         rm -f cscope.out
38         rm -f t/hash t/memdup t/string t/threadhash t/file t/log t/concat t/ring t/opt t/tags
39
40 checkedin:
41         if (cg-status | grep ^[AMD]) ; then echo "difference to repository!"; exit 1; else /bin/true ; fi
42
43 distprep: clean all test clean
44         mkdir $(RELEASENAME)
45         cp -a --parents `git-ls-files` $(RELEASENAME)
46         tar cfz $(TARBALL) $(RELEASENAME)/*
47         rm -rf $(RELEASENAME)
48
49 dist: checkedin distprep
50         cg-tag $(VERSION)