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
etags */*.c */*.h
SRCDIRS = newbrt src src/tests cxx cxx/tests utils db-benchmark-test db-benchmark-test-cxx
clean:
cd newbrt;make clean
cd src;make clean
cd db-benchmark-test-cxx;make clean
for d in $(SRCDIRS); do $(MAKE) -k -C $$d clean; done
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 @@
BENCHDBS = bench.bdb/ bench.tokudb
OPTFLAGS = -O2
CXXFLAGS = -Wall -Werror -g
CXXFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS)
# CFLAGS += -pg
CXXFLAGS += $(OPTFLAGS)
ifdef BDBDIR
BDB_CPPFLAGS = -I$(BDBDIR)/include
......@@ -24,7 +23,7 @@ TARGETS = db-benchmark-test-bdb db-benchmark-test-tokudb
default: $(TARGETS)
clean:
rm -rf $(TARGETS) $(BENCHDBS)
rm -rf $(TARGETS) $(BENCHDBS) *.gcno *.gcda *.gcov
db-benchmark-test-tokudb: ../lib/libtdb_cxx.a
db-benchmark-test-tokudb: db-benchmark-test.cpp
......
......@@ -8,9 +8,8 @@
BENCHDBS = bench.bdb/ bench.tokudb
OPTFLAGS = -O2
CFLAGS = -Wall -Werror -g
CFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS)
# CFLAGS += -pg
CFLAGS += $(OPTFLAGS)
ifdef BDBDIR
BDB_CPPFLAGS = -I$(BDBDIR)/include
......@@ -25,7 +24,7 @@ TARGETS = db-benchmark-test-bdb db-benchmark-test-tokudb
default: $(TARGETS)
clean:
rm -rf $(TARGETS) $(BENCHDBS)
rm -rf $(TARGETS) $(BENCHDBS) *.gcno *.gcda *.gcov
db-benchmark-test-tokudb: db-benchmark-test.c
$(CC) $(CFLAGS) -I../include -L../lib -ldb -Wl,-rpath,$(PWD)/../lib $< -o $@ -DDIRSUF=tokudb
......
......@@ -6,7 +6,7 @@ BDB_LOAD=$(BDBDIR)/bin/db_load
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
# 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