Commit b0e9e611 authored by Rich Prohaska's avatar Rich Prohaska

make build-coverage. addresses #277

git-svn-id: file:///svn/tokudb@1729 c7de825b-a66e-492c-adef-691d508d4ae1
parent 1febf3a4
TAGS: */*.c */*.h TAGS: */*.c */*.h
etags */*.c */*.h etags */*.c */*.h
SRCDIRS = newbrt src src/tests cxx cxx/tests utils db-benchmark-test db-benchmark-test-cxx
clean: clean:
cd newbrt;make clean for d in $(SRCDIRS); do $(MAKE) -k -C $$d clean; done
cd src;make clean
cd db-benchmark-test-cxx;make clean build:
for d in $(SRCDIRS); do $(MAKE) -k -C $$d; done
build-coverage:
for d in $(SRCDIRS); do $(MAKE) -k -C $$d -k OPTFLAGS="-O0" GCOV_FLAGS="-fprofile-arcs -ftest-coverage"; done
...@@ -7,9 +7,8 @@ ...@@ -7,9 +7,8 @@
BENCHDBS = bench.bdb/ bench.tokudb BENCHDBS = bench.bdb/ bench.tokudb
OPTFLAGS = -O2 OPTFLAGS = -O2
CXXFLAGS = -Wall -Werror -g CXXFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS)
# CFLAGS += -pg # CFLAGS += -pg
CXXFLAGS += $(OPTFLAGS)
ifdef BDBDIR ifdef BDBDIR
BDB_CPPFLAGS = -I$(BDBDIR)/include BDB_CPPFLAGS = -I$(BDBDIR)/include
...@@ -24,7 +23,7 @@ TARGETS = db-benchmark-test-bdb db-benchmark-test-tokudb ...@@ -24,7 +23,7 @@ TARGETS = db-benchmark-test-bdb db-benchmark-test-tokudb
default: $(TARGETS) default: $(TARGETS)
clean: clean:
rm -rf $(TARGETS) $(BENCHDBS) rm -rf $(TARGETS) $(BENCHDBS) *.gcno *.gcda *.gcov
db-benchmark-test-tokudb: ../lib/libtdb_cxx.a db-benchmark-test-tokudb: ../lib/libtdb_cxx.a
db-benchmark-test-tokudb: db-benchmark-test.cpp db-benchmark-test-tokudb: db-benchmark-test.cpp
......
...@@ -8,9 +8,8 @@ ...@@ -8,9 +8,8 @@
BENCHDBS = bench.bdb/ bench.tokudb BENCHDBS = bench.bdb/ bench.tokudb
OPTFLAGS = -O2 OPTFLAGS = -O2
CFLAGS = -Wall -Werror -g CFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS)
# CFLAGS += -pg # CFLAGS += -pg
CFLAGS += $(OPTFLAGS)
ifdef BDBDIR ifdef BDBDIR
BDB_CPPFLAGS = -I$(BDBDIR)/include BDB_CPPFLAGS = -I$(BDBDIR)/include
...@@ -25,7 +24,7 @@ TARGETS = db-benchmark-test-bdb db-benchmark-test-tokudb ...@@ -25,7 +24,7 @@ TARGETS = db-benchmark-test-bdb db-benchmark-test-tokudb
default: $(TARGETS) default: $(TARGETS)
clean: clean:
rm -rf $(TARGETS) $(BENCHDBS) rm -rf $(TARGETS) $(BENCHDBS) *.gcno *.gcda *.gcov
db-benchmark-test-tokudb: db-benchmark-test.c db-benchmark-test-tokudb: db-benchmark-test.c
$(CC) $(CFLAGS) -I../include -L../lib -ldb -Wl,-rpath,$(PWD)/../lib $< -o $@ -DDIRSUF=tokudb $(CC) $(CFLAGS) -I../include -L../lib -ldb -Wl,-rpath,$(PWD)/../lib $< -o $@ -DDIRSUF=tokudb
......
...@@ -6,7 +6,7 @@ BDB_LOAD=$(BDBDIR)/bin/db_load ...@@ -6,7 +6,7 @@ BDB_LOAD=$(BDBDIR)/bin/db_load
DIFF=diff -I 'db_pagesize=' DIFF=diff -I 'db_pagesize='
CFLAGS = -std=gnu89 -W -Wall -Wno-unused -g CFLAGS = -std=gnu89 -W -Wall -Wno-unused -g $(OPTFLAGS) $(GCOV_FLAGS)
# vars to compile bins that handle tokudb using libdb.so # vars to compile bins that handle tokudb using libdb.so
# when one uses relative address in an rpath, the library better be located relative # when one uses relative address in an rpath, the library better be located relative
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment