2007-12-04 13:14:30 +00:00
|
|
|
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
|
|
|
|
2007-09-19 18:55:08 +00:00
|
|
|
# standard build: make
|
2007-11-29 21:34:11 +00:00
|
|
|
# build with Berkeley DB 4.1: make BDBDIR=/usr/local/BerkeleyDB.4.1
|
|
|
|
# build with TokuDB: make BDBDIR=~/svn/tokudb
|
2007-12-18 16:24:53 +00:00
|
|
|
# build with g++: make CC=g++
|
2007-09-19 18:55:08 +00:00
|
|
|
|
2007-10-01 21:19:53 +00:00
|
|
|
BENCHDBS = bench.bdb/ bench.tokudb
|
2007-09-19 18:55:08 +00:00
|
|
|
|
2007-11-29 21:34:11 +00:00
|
|
|
OPTFLAGS = -O2
|
2008-01-18 14:43:32 +00:00
|
|
|
CFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS)
|
2007-09-19 18:55:08 +00:00
|
|
|
# CFLAGS += -pg
|
|
|
|
|
2007-11-29 21:34:11 +00:00
|
|
|
ifdef BDBDIR
|
|
|
|
BDB_CPPFLAGS = -I$(BDBDIR)/include
|
|
|
|
BDB_LDFLAGS = -L$(BDBDIR)/lib -ldb -lpthread -Wl,-rpath,$(BDBDIR)/lib
|
2007-09-19 18:55:08 +00:00
|
|
|
else
|
2007-11-29 21:34:11 +00:00
|
|
|
BDB_CPPFLAGS =
|
|
|
|
BDB_LDFLAGS = -ldb
|
2007-09-19 18:55:08 +00:00
|
|
|
endif
|
2008-02-01 14:31:38 +00:00
|
|
|
TDB_CPPFLAGS = -I../include
|
|
|
|
TDB_LDFLAGS = -L../lib -ldb -Wl,-rpath=$(PWD)/../lib
|
2007-09-19 18:55:08 +00:00
|
|
|
|
2008-01-23 21:30:20 +00:00
|
|
|
TARGET_BDB = db-benchmark-test-bdb
|
|
|
|
TARGET_TDB = db-benchmark-test-tokudb
|
|
|
|
TARGETS = $(TARGET_BDB) $(TARGET_TDB)
|
2007-09-19 18:55:08 +00:00
|
|
|
|
2007-10-01 21:19:53 +00:00
|
|
|
default: $(TARGETS)
|
2007-09-19 18:55:08 +00:00
|
|
|
|
2008-02-09 22:57:33 +00:00
|
|
|
check: check-default
|
2008-01-23 21:30:20 +00:00
|
|
|
|
|
|
|
check-default: $(TARGET_TDB)
|
|
|
|
$(VALGRIND) ./$(TARGET_TDB)
|
|
|
|
|
|
|
|
check-x: $(TARGET_TDB)
|
|
|
|
$(VALGRIND) ./$(TARGET_TDB) -x
|
|
|
|
|
2007-09-19 18:55:08 +00:00
|
|
|
clean:
|
2008-01-18 14:43:32 +00:00
|
|
|
rm -rf $(TARGETS) $(BENCHDBS) *.gcno *.gcda *.gcov
|
2007-10-01 21:19:53 +00:00
|
|
|
|
|
|
|
db-benchmark-test-tokudb: db-benchmark-test.c
|
2008-02-01 14:31:38 +00:00
|
|
|
$(CC) $(CFLAGS) $(TDB_CPPFLAGS) $(TDB_LDFLAGS) $< -o $@ -DDIRSUF=tokudb
|
2007-10-01 21:19:53 +00:00
|
|
|
db-benchmark-test-bdb: db-benchmark-test.c
|
2008-02-01 14:31:38 +00:00
|
|
|
$(CC) $(CFLAGS) $(BDB_CPPFLAGS) $(BDB_LDFLAGS) $< -o $@ -DDIRSUF=bdb
|