2013-04-16 23:57:34 -04:00
|
|
|
# -*- Mode: Makefile -*-
|
|
|
|
# standard build: make
|
|
|
|
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
|
|
|
|
|
|
|
.DEFAULT_GOAL= default
|
|
|
|
TOKUROOT=../
|
|
|
|
INCLUDEDIRS=-I.
|
|
|
|
DEPEND_COMPILE += \
|
|
|
|
./*.h \
|
|
|
|
#end
|
|
|
|
|
|
|
|
HERE = cxx
|
2013-04-16 23:57:37 -04:00
|
|
|
include $(TOKUROOT)toku_include/Makefile.include
|
2013-04-16 23:57:34 -04:00
|
|
|
#
|
|
|
|
#
|
2008-01-16 17:41:47 +00:00
|
|
|
# OPTFLAGS = -O2
|
|
|
|
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
|
2013-04-16 23:58:06 -04:00
|
|
|
CPPFLAGS = -I../include -I../toku_include
|
2013-04-16 23:58:57 -04:00
|
|
|
CXXFLAGS = $(GCC_VERSION_SPECIFIC) -Werror -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
|
|
|
|
2013-04-16 23:57:26 -04:00
|
|
|
ifeq ($(CC),icc)
|
|
|
|
CXXFLAGS += -diag-disable 981
|
|
|
|
endif
|
|
|
|
|
2008-02-10 03:50:15 +00:00
|
|
|
LIBNAME = libtokudb_cxx
|
2007-12-18 19:37:59 +00:00
|
|
|
|
2013-04-16 23:57:40 -04:00
|
|
|
default: install build
|
2008-04-02 23:40:36 +00:00
|
|
|
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
|
2013-04-16 23:57:26 -04:00
|
|
|
|
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:
|
2013-04-16 23:57:34 -04:00
|
|
|
rm -f $(OBJS) $(LIBNAME).a $(LIBNAME).so *.gcno *.gcda *.gcov
|
|
|
|
cd tests && $(MAKE) clean
|
2007-12-21 19:59:31 +00:00
|
|
|
|
|
|
|
|