2007-12-18 16:22:21 +00:00
|
|
|
SRCS = $(wildcard *.cpp)
|
|
|
|
TARGETS = $(patsubst %.cpp,%,$(SRCS))
|
|
|
|
|
2008-01-16 17:41:47 +00:00
|
|
|
# OPTFLAGS = -O0
|
|
|
|
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
|
2007-12-18 16:22:21 +00:00
|
|
|
CPPFLAGS = -I../ -I../../include
|
2008-01-16 17:41:47 +00:00
|
|
|
CXXFLAGS = -Wall $(OPTFLAGS) -g $(GCOV_FLAGS)
|
2008-02-10 03:50:15 +00:00
|
|
|
LDLIBS = ../../lib/libtokudb_cxx.a ../../lib/libtokudb.a -lz
|
2007-12-18 16:22:21 +00:00
|
|
|
|
2008-02-10 02:39:08 +00:00
|
|
|
ifneq ($(OSX),)
|
2007-12-21 19:59:31 +00:00
|
|
|
VGRIND=
|
|
|
|
else
|
|
|
|
VGRIND=valgrind --quiet --error-exitcode=1 --leak-check=yes
|
|
|
|
endif
|
|
|
|
|
2007-12-18 18:34:44 +00:00
|
|
|
all: $(TARGETS)
|
2007-12-18 16:22:21 +00:00
|
|
|
$(TARGETS): $(DBCXX)
|
|
|
|
|
2007-12-18 16:34:48 +00:00
|
|
|
$(DBCXX):
|
|
|
|
cd ..;make
|
2007-12-18 16:22:21 +00:00
|
|
|
|
|
|
|
clean:
|
2008-02-07 16:45:58 +00:00
|
|
|
rm -rf $(TARGETS) *.gcno *.gcda *.gcov *.db
|
2007-12-21 15:32:21 +00:00
|
|
|
|
2008-02-07 19:06:12 +00:00
|
|
|
check: $(TARGETS) \
|
|
|
|
check_db_create_1 check_db_create_2 check_db_create_3 check_db_create_4
|
2007-12-21 19:59:31 +00:00
|
|
|
$(VGRIND) ./test1
|
|
|
|
$(VGRIND) ./test1e
|
2007-12-25 17:04:07 +00:00
|
|
|
rm -f foo.db
|
2008-02-07 19:06:12 +00:00
|
|
|
$(VGRIND) ./db_create -s main foo.db
|
|
|
|
rm -f foo.db
|
|
|
|
$(VGRIND) ./db_create -D -S -s main foo.db
|
|
|
|
rm -f foo.db
|
2007-12-21 19:59:31 +00:00
|
|
|
$(VGRIND) ./db_create foo.db a b c d
|
|
|
|
$(VGRIND) ./db_dump foo.db > foo.out
|
|
|
|
(echo " 61";echo " 62";echo " 63";echo " 64")>foo.expectout
|
|
|
|
diff foo.out foo.expectout
|
2007-12-21 20:39:53 +00:00
|
|
|
$(VGRIND) ./db_dump_e foo.db > foo.out
|
|
|
|
diff foo.out foo.expectout
|
2007-12-23 01:25:54 +00:00
|
|
|
$(VGRIND) ./exceptions
|
2007-12-30 16:46:07 +00:00
|
|
|
$(VGRIND) ./test_no_env
|
|
|
|
$(VGRIND) ./test_db_assoc3
|
|
|
|
$(VGRIND) ./test_db_assoc3 --more
|
2008-01-10 19:42:08 +00:00
|
|
|
$(VGRIND) ./test_cursor_count
|
2008-01-11 14:38:49 +00:00
|
|
|
$(VGRIND) ./test_fd
|
2008-01-16 17:41:47 +00:00
|
|
|
$(VGRIND) ./test_error_stream
|
2008-02-07 16:45:58 +00:00
|
|
|
$(VGRIND) ./test_reverse_compare_fun
|
|
|
|
$(VGRIND) ./test_db_delete
|
2008-02-08 19:10:34 +00:00
|
|
|
$(VGRIND) ./test_get_not_found
|
2008-02-07 19:06:12 +00:00
|
|
|
|
|
|
|
check_db_create_1:
|
|
|
|
$(VGRIND) ./db_create; let exitcode=$$?; if [ $$exitcode -ne 0 ] ; then exit 0; else exit 1; fi
|
|
|
|
check_db_create_2:
|
|
|
|
$(VGRIND) ./db_create -h; let exitcode=$$?; if [ $$exitcode -ne 0 ] ; then exit 0; else exit 1; fi
|
|
|
|
check_db_create_3:
|
|
|
|
$(VGRIND) ./db_create --help; let exitcode=$$?; if [ $$exitcode -ne 0 ] ; then exit 0; else exit 1; fi
|
|
|
|
check_db_create_4:
|
|
|
|
$(VGRIND) ./db_create -s; let exitcode=$$?; if [ $$exitcode -ne 0 ] ; then exit 0; else exit 1; fi
|