2012-11-27 15:23:21 +00:00
|
|
|
SRCS = $(wildcard *.cc)
|
|
|
|
TARGETS = $(patsubst %.cc,%,$(SRCS))
|
|
|
|
CHECKS = $(patsubst %,%.check,$(TARGETS))
|
2013-03-20 16:51:12 +00:00
|
|
|
CPPFLAGS = -I.. -D__STDC_FORMAT_MACROS
|
|
|
|
CXXFLAGS = -g -Wall -Wextra -Wno-missing-field-initializers -Wshadow
|
2012-11-27 15:23:21 +00:00
|
|
|
|
2013-05-06 08:32:34 -04:00
|
|
|
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*
|
2013-03-17 22:10:33 +00:00
|
|
|
|
2012-11-27 15:23:21 +00:00
|
|
|
ifeq ($(GCOV),1)
|
|
|
|
CXXFLAGS += -fprofile-arcs -ftest-coverage
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
clean:
|
2013-03-23 23:47:17 +00:00
|
|
|
rm -rf $(TARGETS) *.gcov *.gcno *.gcda *.testdir *.dSYM
|
2012-11-27 15:23:21 +00:00
|
|
|
|
|
|
|
check: $(CHECKS)
|
|
|
|
true
|
|
|
|
|
2013-03-19 15:22:57 +00:00
|
|
|
%.check: %
|
2013-05-06 08:32:34 -04:00
|
|
|
LD_LIBRARY_PATH=$(FRACTALTREE_INSTALL_DIR)/lib $(VALGRIND) ./$<
|
2013-03-04 16:43:06 +00:00
|
|
|
|
2013-03-25 19:20:00 +00:00
|
|
|
card.check: card_test.check card_1.check card_inf.check card_inf_1.check card_random_1.check card_etime.check
|
2013-03-21 19:51:36 +00:00
|
|
|
true
|
|
|
|
|
2013-03-04 16:43:06 +00:00
|
|
|
max_test.check: max_test
|
2013-03-19 15:22:57 +00:00
|
|
|
$(VALGRIND) ./$< 1 2
|
|
|
|
|
2013-03-20 16:51:12 +00:00
|
|
|
%: %.cc
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -g -o $@ $<
|
|
|
|
|
2013-03-25 19:20:00 +00:00
|
|
|
card_%: card_%.cc
|
2013-05-06 08:32:34 -04:00
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -g -o $@ $< -I.. -I$(FRACTALTREE_INSTALL_DIR)/include -L$(FRACTALTREE_INSTALL_DIR)/lib -ltokufractaltree -ltokuportability
|