2013-04-17 00:02:16 -04:00
|
|
|
SRCS = $(wildcard *.cc)
|
|
|
|
TARGETS = $(patsubst %.cc,%,$(SRCS))
|
|
|
|
CHECKS = $(patsubst %,%.check,$(TARGETS))
|
|
|
|
CPPFLAGS = -I..
|
2013-04-17 00:02:18 -04:00
|
|
|
CXXFLAGS = -g -fno-implicit-templates
|
2013-04-17 00:02:16 -04:00
|
|
|
|
2013-04-17 00:02:18 -04:00
|
|
|
FRACTALTREE_BASE_DIR = ../../../../tokudb
|
|
|
|
FRACTALTREE_DIR = $(FRACTALTREE_BASE_DIR)/release
|
|
|
|
VALGRIND = valgrind -q --leak-check=full --show-reachable=yes --suppressions=$(FRACTALTREE_BASE_DIR)/build.debug/valgrind.suppressions
|
2013-04-17 00:02:18 -04:00
|
|
|
|
2013-04-17 00:02:16 -04:00
|
|
|
ifeq ($(GCOV),1)
|
|
|
|
CXXFLAGS += -fprofile-arcs -ftest-coverage
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
clean:
|
2013-04-17 00:02:18 -04:00
|
|
|
rm -rf $(TARGETS) *.gcov *.gcno *.gcda *.testdir
|
2013-04-17 00:02:16 -04:00
|
|
|
|
|
|
|
check: $(CHECKS)
|
|
|
|
true
|
|
|
|
|
2013-04-17 00:02:18 -04:00
|
|
|
%.check: %
|
|
|
|
LD_LIBRARY_PATH=$(FRACTALTREE_DIR)/lib $(VALGRIND) ./$<
|
2013-04-17 00:02:18 -04:00
|
|
|
|
|
|
|
max_test.check: max_test
|
2013-04-17 00:02:18 -04:00
|
|
|
$(VALGRIND) ./$< 1 2
|
|
|
|
|
|
|
|
db_libtest: db_libtest.cc
|
|
|
|
$(CXX) -g -o $@ $< -I.. -I$(FRACTALTREE_DIR)/include -L$(FRACTALTREE_DIR)/lib -ltokudb -ltokuportability
|
2013-04-17 00:02:18 -04:00
|
|
|
|
2013-04-17 00:02:18 -04:00
|
|
|
card_test: card_test.cc
|
|
|
|
$(CXX) -g -o $@ $< -I.. -I$(FRACTALTREE_DIR)/include -L$(FRACTALTREE_DIR)/lib -ltokudb -ltokuportability
|
|
|
|
|
|
|
|
card_1: card_1.cc
|
|
|
|
$(CXX) -g -o $@ $< -I.. -I$(FRACTALTREE_DIR)/include -L$(FRACTALTREE_DIR)/lib -ltokudb -ltokuportability
|
|
|
|
|
|
|
|
card_inf: card_inf.cc
|
|
|
|
$(CXX) -g -o $@ $< -I.. -I$(FRACTALTREE_DIR)/include -L$(FRACTALTREE_DIR)/lib -ltokudb -ltokuportability
|
|
|
|
|
|
|
|
card_inf_1: card_inf_1.cc
|
|
|
|
$(CXX) -g -o $@ $< -I.. -I$(FRACTALTREE_DIR)/include -L$(FRACTALTREE_DIR)/lib -ltokudb -ltokuportability
|
2013-04-17 00:02:16 -04:00
|
|
|
|
2013-04-17 00:02:18 -04:00
|
|
|
card_random_1: card_random_1.cc
|
|
|
|
$(CXX) -g -o $@ $< -I.. -I$(FRACTALTREE_DIR)/include -L$(FRACTALTREE_DIR)/lib -ltokudb -ltokuportability
|