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
|
2007-09-19 18:55:08 +00:00
|
|
|
CFLAGS = -Wall -Werror -g
|
|
|
|
# CFLAGS += -pg
|
2007-11-29 21:34:11 +00:00
|
|
|
CFLAGS += $(OPTFLAGS)
|
2007-09-19 18:55:08 +00:00
|
|
|
|
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
|
|
|
|
|
2007-10-01 21:19:53 +00:00
|
|
|
TARGETS = db-benchmark-test-bdb db-benchmark-test-tokudb
|
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
|
|
|
|
|
|
|
clean:
|
2007-10-01 21:19:53 +00:00
|
|
|
rm -rf $(TARGETS) $(BENCHDBS)
|
|
|
|
|
|
|
|
db-benchmark-test-tokudb: db-benchmark-test.c
|
2007-12-18 16:24:53 +00:00
|
|
|
$(CC) $(CFLAGS) -I../include -L../lib -ldb -Wl,-rpath,$(PWD)/../lib $< -o $@ -DDIRSUF=tokudb
|
2007-10-01 21:19:53 +00:00
|
|
|
db-benchmark-test-bdb: db-benchmark-test.c
|
2007-12-18 16:24:53 +00:00
|
|
|
$(CC) $(CFLAGS) $(BDB_CPPFLAGS) $(BDB_LDFLAGS) $< -o $@ -DDIRSUF=bdb
|