2008-01-16 17:41:47 +00:00
|
|
|
# OPTFLAGS = -O2
|
|
|
|
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
|
2007-12-17 22:00:54 +00:00
|
|
|
CPPFLAGS = -I../include
|
2008-01-16 17:41:47 +00:00
|
|
|
CXXFLAGS = -Wall -g $(OPTFLAGS) $(GCOV_FLAGS)
|
2007-12-18 00:57:28 +00:00
|
|
|
CC = c++
|
2007-12-18 16:22:21 +00:00
|
|
|
LDFLAGS = -lz
|
2007-12-18 16:34:48 +00:00
|
|
|
SRCS = $(wildcard *.cpp)
|
|
|
|
OBJS = $(patsubst %.cpp, %.o, $(SRCS))
|
2007-12-18 19:37:59 +00:00
|
|
|
|
2008-02-10 03:50:15 +00:00
|
|
|
LIBNAME = libtokudb_cxx
|
2007-12-18 19:37:59 +00:00
|
|
|
|
2008-04-02 23:40:36 +00:00
|
|
|
default: install build
|
|
|
|
build: $(LIBNAME).a
|
2008-04-03 20:41:53 +00:00
|
|
|
if ! diff $(LIBNAME).a ../lib/$(LIBNAME).a >/dev/null 2>&1; then cp $< ../lib/; fi
|
2008-04-02 23:40:36 +00:00
|
|
|
cd tests; $(MAKE) build
|
|
|
|
check:
|
|
|
|
cd tests; $(MAKE) check
|
2007-12-18 19:37:59 +00:00
|
|
|
install: $(LIBNAME).a
|
|
|
|
cp $< ../lib/
|
2007-12-18 20:39:02 +00:00
|
|
|
$(OBJS): ../include/db_cxx.h
|
2007-12-18 16:22:21 +00:00
|
|
|
test1: test1.o dbt.o db.o dbenv.o ../lib/libdb.a
|
2007-12-18 01:31:34 +00:00
|
|
|
|
2007-12-18 19:37:59 +00:00
|
|
|
$(LIBNAME).a: $(OBJS)
|
2008-07-23 12:55:37 +00:00
|
|
|
$(AR) cr $@ $(OBJS)
|
2007-12-21 19:59:31 +00:00
|
|
|
clean:
|
2008-01-16 17:41:47 +00:00
|
|
|
rm -f $(OBJS) $(LIBNAME).a $(LIBNAME).so *.gcno *.gcda *.gcov
|
2008-04-02 23:40:36 +00:00
|
|
|
cd tests; $(MAKE) clean
|
2007-12-21 19:59:31 +00:00
|
|
|
|
|
|
|
|