Commit 9b550f1e authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#4096 add version string to portability lib name refs[t:4096]

git-svn-id: file:///svn/toku/tokudb@38429 c7de825b-a66e-492c-adef-691d508d4ae1
parent 67548a08
......@@ -16,7 +16,8 @@ ifneq ($(GCOV),)
CFLAGS += -fprofile-arcs -ftest-coverage -DGCOV
endif
LDFLAGS = -L../../lib -Wl,-rpath,../../lib
LDLIBS = -ltokuportability -lpthread -ldl
LIBTOKUPORTABILITY=tokuportability
LDLIBS = -l$(LIBTOKUPORTABILITY) -lpthread -ldl
SRCS=$(sort $(filter-out dir.%.c,$(wildcard *.c)))
TARGETS = $(patsubst %.c,%,$(SRCS))
RUNTARGETS = $(patsubst %,%.tdbrun,$(TARGETS))
......
......@@ -23,7 +23,7 @@ NEWBRT_SO = $(TOKUROOT)lib/libnewbrt.$(SOEXT)
SKIP_NEWBRTRULE=1
include $(TOKUROOT)toku_include/Makefile.include
LDFLAGS+=-L$(TOKUROOT)lib -Wl,-rpath,$(shell pwd)/$(TOKUROOT)lib
LDLIBS+=-lnewbrt -ltokuportability
LDLIBS+=-lnewbrt -l$(LIBTOKUPORTABILITY)
# When debugging, try: valgrind --show-reachable=yes --leak-check=full ./brt-test
......
......@@ -250,7 +250,7 @@ clean:
rm -f test_oexcl.c.tmp
rm -f *.brt *.clean *.dirty *.tdb *.dat *.data *.out *.check.valgrind *.fastlog
$(BINS): LDFLAGS=-L../../lib -ltokuportability -lnewbrt $(ALWAYS_LINK) -Wl,-rpath,$(shell pwd)/$(TOKUROOT)lib
$(BINS): LDFLAGS=-L../../lib -l$(LIBTOKUPORTABILITY) -lnewbrt $(ALWAYS_LINK) -Wl,-rpath,$(shell pwd)/$(TOKUROOT)lib
$(BINS): test.h
foo:
......
LIBNAME = libtokudb
TOKUROOT=../
include $(TOKUROOT)toku_include/Makefile.include
local setup:
cp ../include/db.h include/tokudb.h
cp ../include/db.h include
cp ../include/tdb-internal.h include
cp ../toku_include/toku_list.h include
cp ../lib/$(LIBNAME).so lib
cp ../lib/lib$(LIBTOKUDB).so lib
cp ../toku_include/toku_os.h include
cp ../linux/toku_os_types.h include
cp ../linux/toku_time.h include
cp ../lib/libtokuportability.* lib
cp ../lib/lib$(LIBTOKUPORTABILITY).* lib
clean:
rm -f include/* lib/*
......@@ -3,9 +3,10 @@ TARGETS = $(patsubst %.c,%,$(SRCS)) $(patsubst %.c,%-bdb,$(SRCS))
CPPFLAGS = -I../include -D_GNU_SOURCE
CFLAGS = -g -std=c99 -Wall
LIBTOKUDB = tokudb
LDFLAGS = -L../lib -l$(LIBTOKUDB) -ltokuportability -Wl,-rpath,../lib
LIBTOKUPORTABILITY = tokuportability
LDFLAGS = -L../lib -l$(LIBTOKUDB) -l$(LIBTOKUPORTABILITY) -Wl,-rpath,../lib
default: $(TARGETS)
default local: $(TARGETS)
%-bdb: %.c
$(CC) -D_GNU_SOURCE -DBDB $(CFLAGS) $^ -o $@ -ldb
......
......@@ -12,9 +12,7 @@ DEPEND_COMPILE += \
include $(TOKUROOT)toku_include/Makefile.include
CPPFLAGS+=-D_GNU_SOURCE -D_THREAD_SAFE
LIBNAME=libtokudb
LIBRARY=../lib/$(LIBNAME).$(SOEXT)
LIBRARY=../lib/lib$(LIBTOKUDB).$(SOEXT)
OBJS_RAW = \
ydb_lib \
......@@ -84,7 +82,7 @@ ifeq ($(CC),icc)
endif
endif
check_globals: $(LIBNAME).$(SOEXT)
check_globals: lib$(LIBTOKUDB).$(SOEXT)
python tokuglobals.py $<
.PHONY: check_tests
......
......@@ -24,7 +24,7 @@ LIBTDB=$(WIN_YDB)
%.tdb$(BINSUF): LINK_FILES+=$(WIN_YDB)
TDB_EXTRA_NEEDED=$(WIN_YDB)
else
LIBTDB=../../lib/libtokudb.$(SOEXT)
LIBTDB=../../lib/lib$(LIBTOKUDB).$(SOEXT)
TLIBTDB=../libtokudbtrace.$(SOEXT)
%.tdb$(BINSUF): DLINK_FILES+=$(LIBTDB)
%.tdb$(BINSUF): RPATH_DIRS+=$(patsubst %/,%,$(dir $(LIBTDB)))
......@@ -621,14 +621,14 @@ TDB_CFLAGS=
%.bdb$(BINSUF): BDB_CFLAGS= -DENVDIR=\"dir.$<.bdb\" -DUSE_BDB -DIS_TDB=0 -DTOKU_ALLOW_DEPRECATED
%.bdb$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK)
$(CC) $< $(BDB_CFLAGS) $(BIN_FROM_C_FLAGS) -L$(TOKUROOT)lib -Wl,-rpath,$(shell pwd)/$(TOKUROOT)lib -ltokuportability $(LINK_MUST_BE_LAST)
$(CC) $< $(BDB_CFLAGS) $(BIN_FROM_C_FLAGS) -L$(TOKUROOT)lib -Wl,-rpath,$(shell pwd)/$(TOKUROOT)lib -l$(LIBTOKUPORTABILITY) $(LINK_MUST_BE_LAST)
%.tdbt$(BINSUF): DLINK_FILES+=$(TLIBTDB)
%.tdbt$(BINSUF): RPATH_DIRS+=$(dir $(TLIBTDB))
%.tdb$(BINSUF) %.tdbt$(BINSUF): TDB_CFLAGS= -DENVDIR=\"dir.$<.tdb\" -DUSE_TDB -DIS_TDB=1
%.tdb$(BINSUF) %.tdbt$(BINSUF): CPPFLAGS+=-I$(TOKUROOT)include
%.tdb$(BINSUF) %.tdbt$(BINSUF): LDFLAGS+=-ltokuportability
%.tdb$(BINSUF) %.tdbt$(BINSUF): LDFLAGS+=-l$(LIBTOKUPORTABILITY)
loader-stress-test: CPPFLAGS+=-I$(TOKUROOT)include -DENVDIR=\"dir.$<\"
loader-stress-test: LOADLIBES+=-L../lib -ltokudb -Wl,-rpath,..
......
......@@ -167,8 +167,10 @@ else ifeq ($(GCCVERSION),4.4.0)
else ifeq ($(GCCVERSION),4.6.2)
CFLAGS += -Wno-error=deprecated-declarations
endif
LIBPORTABILITY_SO=$(TOKUROOT)lib/libtokuportability.$(SOEXT)
LIBPORTABILITY_A=$(TOKUROOT)lib/libtokuportability.$(AEXT)
LIBTOKUDB=tokudb
LIBTOKUPORTABILITY=tokuportability
LIBPORTABILITY_SO=$(TOKUROOT)lib/lib$(LIBTOKUPORTABILITY).$(SOEXT)
LIBPORTABILITY_A=$(TOKUROOT)lib/lib$(LIBTOKUPORTABILITY).$(AEXT)
PORTABILITY_HEADERS= $(TOKUROOT)$(SYSTEM)
ALWAYS_LINK= -lz -lpthread -ldl
......
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