mariadb/storage/tokudb/tests/Makefile

52 lines
1.5 KiB
Makefile
Raw Normal View History

SRCS = $(wildcard *.cc)
TARGETS = $(patsubst %.cc,%,$(SRCS))
CHECKS = $(patsubst %,%.check,$(TARGETS))
CPPFLAGS = -I.. -D__STDC_FORMAT_MACROS
2014-11-12 08:38:04 -05:00
CXXFLAGS = -g -Wall -Wextra -Wno-missing-field-initializers -Wshadow
ifdef USE_OPENMP
CPPFLAGS += -DUSE_OPENMP
CXXFLAGS += -fopenmp
endif
FRACTALTREE_BASE_DIR = ../ft-index
FRACTALTREE_INSTALL_DIR = $(FRACTALTREE_BASE_DIR)/install.debug
VALGRIND = valgrind -q --leak-check=full --show-reachable=yes --suppressions=$(FRACTALTREE_BASE_DIR)/ft/valgrind.suppressions --soname-synonyms=somalloc=*tokuportability*
ifeq ($(GCOV),1)
CXXFLAGS += -fprofile-arcs -ftest-coverage
endif
all: $(TARGETS)
clean:
rm -rf $(TARGETS) *.gcov *.gcno *.gcda *.testdir *.dSYM
2014-11-10 16:34:55 -05:00
%.check: %
LD_LIBRARY_PATH=$(FRACTALTREE_INSTALL_DIR)/lib $(VALGRIND) ./$<
card.check: card_test.check card_1.check card_inf.check card_inf_1.check card_random_1.check card_etime.check
true
2014-11-12 08:38:04 -05:00
ifndef USE_OPENMP
# unravel vlq_test_uint64 8 times
vlq_test_uint64_%.check:
LD_LIBRARY_PATH=$(FRACTALTREE_INSTALL_DIR)/lib $(VALGRIND) ./vlq_test_uint64 $(patsubst vlq_test_uint64_%.check,%,$@) 8
vlq_test_uint64.check: $(foreach i,0 1 2 3 4 5 6 7,vlq_test_uint64_$(i).check)
true
endif
2014-11-10 16:34:55 -05:00
vlq.check: vlq_test.check vlq_test_uint32.check vlq_test_uint64.check
true
max_test.check: max_test
$(VALGRIND) ./$< 1 2
2014-11-12 08:38:04 -05:00
check: $(CHECKS)
true
%: %.cc
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -g -o $@ $<
card_%: card_%.cc
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -g -o $@ $< -I.. -I$(FRACTALTREE_INSTALL_DIR)/include -L$(FRACTALTREE_INSTALL_DIR)/lib -ltokufractaltree -ltokuportability