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)
|
2007-12-18 19:57:36 +00:00
|
|
|
LDLIBS = ../../lib/libtdb_cxx.a ../../lib/libdb.a -lz
|
2007-12-18 16:22:21 +00:00
|
|
|
|
2007-12-21 19:59:31 +00:00
|
|
|
ifeq ($(OSX),OSX)
|
|
|
|
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-01-16 17:41:47 +00:00
|
|
|
rm -rf $(TARGETS) *.gcno *.gcda *.gcov
|
2007-12-21 15:32:21 +00:00
|
|
|
|
|
|
|
check: $(TARGETS)
|
2007-12-21 19:59:31 +00:00
|
|
|
$(VGRIND) ./test1
|
|
|
|
$(VGRIND) ./test1e
|
2007-12-25 17:04:07 +00:00
|
|
|
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-01-10 19:42:08 +00:00
|
|
|
|