diff --git a/db-benchmark-test-cxx/Makefile b/db-benchmark-test-cxx/Makefile index c7e437ac010..4ecea9027b7 100644 --- a/db-benchmark-test-cxx/Makefile +++ b/db-benchmark-test-cxx/Makefile @@ -47,7 +47,7 @@ clean: db-benchmark-test-tokudb: ../lib/libtokudb_cxx.a db-benchmark-test-tokudb: db-benchmark-test.cpp - $(CXX) $(CXXFLAGS) -I../include -L../lib -Wl,-rpath,$(PWD)/../lib $< -o $@ -ltokudb -ltokudb_cxx -DDIRSUF=tokudb + $(CXX) $(CXXFLAGS) -I../include -L../lib -Wl,-rpath,$(PWD)/../lib $< -o $@ -ltokudb -ltokudb_cxx -lz -DDIRSUF=tokudb db-benchmark-test-bdb: db-benchmark-test.cpp $(CXX) $(CXXFLAGS) $(BDB_CPPFLAGS) $(BDB_LDFLAGS) $< -o $@ -DDIRSUF=bdb diff --git a/db-benchmark-test/Makefile b/db-benchmark-test/Makefile index fd8353a0ea4..9fa9f3b2137 100644 --- a/db-benchmark-test/Makefile +++ b/db-benchmark-test/Makefile @@ -20,6 +20,7 @@ OPTFLAGS = -O2 CFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS) $(PROF_FLAGS) # CFLAGS += -pg +LDFLAGS += -lpthread ifdef BDBDIR BDB_CPPFLAGS = -I$(BDBDIR)/include BDB_LDFLAGS = -L$(BDBDIR)/lib -ldb -lpthread -Wl,-rpath,$(BDBDIR)/lib @@ -28,7 +29,7 @@ BDB_CPPFLAGS = BDB_LDFLAGS = -ldb endif TDB_CPPFLAGS = -I../include -TDB_LDFLAGS = -L../lib -ltokudb -Wl,-rpath,$(PWD)/../lib +TDB_LDFLAGS = -L../lib -ltokudb -lz -Wl,-rpath,$(PWD)/../lib TARGET_BDB = db-benchmark-test-bdb TARGET_TDB = db-benchmark-test-tokudb diff --git a/src/lock_tree/tests/Makefile b/src/lock_tree/tests/Makefile index 5a03c6b2397..987b5867dca 100644 --- a/src/lock_tree/tests/Makefile +++ b/src/lock_tree/tests/Makefile @@ -21,6 +21,7 @@ CFLAGS += -Wbad-function-cast -Wcast-align -Waggregate-return CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute CPPFLAGS += -L../ -L../../range_tree CPPFLAGS += -I. -I../ -I../../range_tree -I../../../newbrt -I../../../include +LDFLAGS += -lz SRCS = $(wildcard *.c) @@ -118,13 +119,13 @@ foo: echo ../locktree.h test.h $(LT_LINEAR) %.lin: %.c ../locktree.h test.h $(LT_LINEAR) - $(CC) -DDIR=\"dir.$<.lin\" $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LT_LINEAR) $(NEWBRT_BINS) + $(CC) -DDIR=\"dir.$<.lin\" $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LT_LINEAR) $(NEWBRT_BINS) $(LDFLAGS) %.tlin: %.c ../locktree.h test.h $(LT_TLINEAR) - $(CC) -DDIR=\"dir.$<.tlin\" $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LT_TLINEAR) $(NEWBRT_BINS) -DTOKU_RT_NOOVERLAPS + $(CC) -DDIR=\"dir.$<.tlin\" $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LT_TLINEAR) $(NEWBRT_BINS) -DTOKU_RT_NOOVERLAPS $(LDFLAGS) %.tlog: %.c ../locktree.h test.h $(LT_TLOG) - $(CC) -DDIR=\"dir.$<.tlog\" $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LT_TLOG) $(NEWBRT_BINS) -DTOKU_RT_NOOVERLAPS + $(CC) -DDIR=\"dir.$<.tlog\" $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LT_TLOG) $(NEWBRT_BINS) -DTOKU_RT_NOOVERLAPS $(LDFLAGS) %.log: %.c ../locktree.h test.h $(LT_LOG) - $(CC) -DDIR=\"dir.$<.log\" $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LT_LOG) $(NEWBRT_BINS) + $(CC) -DDIR=\"dir.$<.log\" $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LT_LOG) $(NEWBRT_BINS) $(LDFLAGS) clean: rm -f $(ALL_TESTS) *.o *.gcno *.gcda *.gcov diff --git a/src/tests/Makefile b/src/tests/Makefile index 54ab49efb16..dc4168ec3f9 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -32,8 +32,8 @@ endif BDB_LDFLAGS += -Wl,-rpath,$(BDBDIR)/lib endif BDB_LDFLAGS += -lpthread - TDB_LOADLIBES = -L.. -ltokudb -Wl,-rpath,.. -lpthread - TDB_TRACELOADLIBES = -L.. -ltokudbtrace -Wl,-rpath,.. -lpthread + TDB_LOADLIBES = -L.. -ltokudb -Wl,-rpath,.. -lpthread -lz + TDB_TRACELOADLIBES = -L.. -ltokudbtrace -Wl,-rpath,.. -lpthread -lz ifeq ($(VGRIND),) BDB_SUPPRESSIONS = diff --git a/utils/Makefile b/utils/Makefile index f6f3366dabe..80370aa136c 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -26,7 +26,7 @@ else SETTOKUENV= UNSETTOKUENV= endif -LDFLAGS = -L../lib -ltokudb -lpthread $(TDB_LOADLIBES) +LDFLAGS = -L../lib -ltokudb -lpthread $(TDB_LOADLIBES) -lz # vars to compile bins that handle tokudb using libtokudb.a STATIC_CPPFLAGS = -I../include