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 @@ ...@@ -3,14 +3,30 @@
OPTFLAGS = -O2 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),) ifneq ($(GCOV),)
GCOV_FLAGS = -fprofile-arcs -ftest-coverage GCOV_FLAGS = -fprofile-arcs -ftest-coverage
else else
GCOV_FLAGS = GCOV_FLAGS =
endif endif
VISIBILITY = -fvisibility=hidden
CFLAGS = -W -Wall -Wextra -Werror -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS) CFLAGS = -W -Wall -Wextra -Werror -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS)
CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
...@@ -22,8 +38,9 @@ ifneq ($(OSX),) ...@@ -22,8 +38,9 @@ ifneq ($(OSX),)
CFLAGS+=-fno-common CFLAGS+=-fno-common
endif endif
.PHONY: install logformat .PHONY: install
install: linear.o rangetree.o log_nooverlap.o tokuredblack.o #log.o install: linear.o rangetree.o log_nooverlap.o tokuredblack.o $(LIBRARY) #log.o
cp $(LIBRARY) ../../lib/
clean: clean:
rm -rf *.o *.gcno *.gcda *.gcov rm -rf *.o *.gcno *.gcda *.gcov
...@@ -40,4 +57,7 @@ log.o: log.c $(HEADERS) ...@@ -40,4 +57,7 @@ log.o: log.c $(HEADERS)
log_nooverlap.o: log_nooverlap.c $(HEADERS) log_nooverlap.o: log_nooverlap.c $(HEADERS)
tokuredblack.o: tokuredblack.c $(HEADERS) tokuredblack.h tokuredblack.o: tokuredblack.c $(HEADERS) tokuredblack.h
\ No newline at end of file
$(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