Commit db92f134 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #479

Adding dynamic library for redblack tree.

git-svn-id: file:///svn/tokudb@2728 c7de825b-a66e-492c-adef-691d508d4ae1
parent 550fff4e
......@@ -3,14 +3,30 @@
OPTFLAGS = -O2
LIBNAME=libtokurange
EXPORTMAP = -Wl,--version-script=export.map
VISIBILITY = -fvisibility=hidden
ifneq ($(OSX),)
LIBRARY=$(LIBNAME).dylib
SHARED=-dynamiclib
RPATHNAME=-install_name @rpath/$(LIBRARY)
CFLAGS+=-fno-common
else
LIBRARY=$(LIBNAME).so
SHARED=-shared $(EXPORTMAP)
RPATHNAME=
endif
LIBRARY=$(LIBNAME).$(LIBEXT)
ifneq ($(GCOV),)
GCOV_FLAGS = -fprofile-arcs -ftest-coverage
else
GCOV_FLAGS =
endif
VISIBILITY = -fvisibility=hidden
CFLAGS = -W -Wall -Wextra -Werror -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS)
CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
......@@ -22,8 +38,9 @@ ifneq ($(OSX),)
CFLAGS+=-fno-common
endif
.PHONY: install logformat
install: linear.o rangetree.o log_nooverlap.o tokuredblack.o #log.o
.PHONY: install
install: linear.o rangetree.o log_nooverlap.o tokuredblack.o $(LIBRARY) #log.o
cp $(LIBRARY) ../../lib/
clean:
rm -rf *.o *.gcno *.gcda *.gcov
......@@ -41,3 +58,6 @@ log.o: log.c $(HEADERS)
log_nooverlap.o: log_nooverlap.c $(HEADERS)
tokuredblack.o: tokuredblack.c $(HEADERS) tokuredblack.h
$(LIBRARY): tokuredblack.o
cc $(CPPFLAGS) $^ $(SHARED) -o $@ $(CFLAGS) $(RPATHNAME)
{
global:
db_create;
db_env_create;
db_strerror;
db_version;
log_compare;
db_env_set_func_fsync;
toku_ydb_error_all_cases;
local: *;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment