From cc067deb768e896c7867b909926f61d2fd50f099 Mon Sep 17 00:00:00 2001 From: sears Date: Wed, 22 Feb 2012 23:42:54 +0000 Subject: [PATCH] fixup makefiles for mapkeeper server and CMakeLists.txt git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@3779 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe --- CMakeLists.txt | 12 ++--- servers/mapkeeper/Makefile | 48 +++++++------------ servers/mapkeeper/Makefile.local | 25 ---------- servers/mapkeeper/Makefile.y | 38 +++++++++++++++ .../main/{lsm_client.cc => blsm_client.cc} | 0 .../main/{lsm_server.cc => blsm_server.cc} | 0 6 files changed, 60 insertions(+), 63 deletions(-) delete mode 100644 servers/mapkeeper/Makefile.local create mode 100644 servers/mapkeeper/Makefile.y rename servers/mapkeeper/main/{lsm_client.cc => blsm_client.cc} (100%) rename servers/mapkeeper/main/{lsm_server.cc => blsm_server.cc} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbffed1..a5e3d33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,27 +60,27 @@ if(NOT HAVE_STASIS) message(STATUS "stasis not found; only building client library") endif(NOT HAVE_STASIS) -SET(CLIENT_LIBRARIES logstore_client pthread) +SET(CLIENT_LIBRARIES blsm_client pthread) IF ( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" ) - SET(COMMON_LIBRARIES logstore stasis m pthread stdc++) #-Wno-variadic-macros + SET(COMMON_LIBRARIES blsm stasis m pthread stdc++) #-Wno-variadic-macros SET(CMAKE_C_FLAGS "-g -Wall -pedantic -std=gnu99 -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_C_FLAGS}") SET(CMAKE_CXX_FLAGS "-g -Wall -Wno-long-long -pedantic -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_CXX_FLAGS}") ELSEIF ( "${CMAKE_C_COMPILER_ID}" STREQUAL "SunPro" ) - SET(COMMON_LIBRARIES logstore stasis m pthread Crun Cstd) + SET(COMMON_LIBRARIES blsm stasis m pthread Crun Cstd) SET(CMAKE_C_FLAGS "-g -xc99=all -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_C_FLAGS}") SET(CMAKE_CXX_FLAGS "-g -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_CXX_FLAGS}") ELSE( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" ) # TODO: how to detect compilers correctly on old cmake??? This is a huge hack; it uses old gcc # options, since cmake is old... - SET(COMMON_LIBRARIES logstore stasis m pthread stdc++) + SET(COMMON_LIBRARIES blsm stasis m pthread stdc++) SET(CMAKE_C_FLAGS "-g -Wall -pedantic -std=gnu99 -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_C_FLAGS}") SET(CMAKE_CXX_FLAGS "-g -Wall -Wno-long-long -pedantic -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_CXX_FLAGS}") ENDIF ( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" ) #CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) IF ( HAVE_STASIS ) - ADD_LIBRARY(logstore requestDispatch.cpp simpleServer.cpp logserver.cpp blsm.cpp diskTreeComponent.cpp memTreeComponent.cpp datapage.cpp merger.cpp tuplemerger.cpp mergeStats.cpp mergeManager.cpp bloomFilter.c) + ADD_LIBRARY(blsm requestDispatch.cpp simpleServer.cpp logserver.cpp blsm.cpp diskTreeComponent.cpp memTreeComponent.cpp datapage.cpp merger.cpp tuplemerger.cpp mergeStats.cpp mergeManager.cpp bloomFilter.c) ENDIF ( HAVE_STASIS ) -ADD_LIBRARY(logstore_client tcpclient.cpp) +ADD_LIBRARY(blsm_client tcpclient.cpp) diff --git a/servers/mapkeeper/Makefile b/servers/mapkeeper/Makefile index b38f328..8242c64 100644 --- a/servers/mapkeeper/Makefile +++ b/servers/mapkeeper/Makefile @@ -1,38 +1,22 @@ -ROOT=/home/y -include $(ROOT)/share/yahoo_cfg/Make.defs +THRIFT_DIR = /home/sears/local/thrift -USE_OSE = no +CPPFLAGS =-I../../../stasis -I../.. -I. -I $(THRIFT_DIR)/include/thrift -I../../../mapkeeper/thrift/gen-cpp +CXXFLAGS =-g -O3 -LIB_NAME = LSMServer -SHLIB_VERSION = 1 +LDFLAGS=-lpthread -lblsm -lstasis -lmapkeeper -lthrift \ + -L $(THRIFT_DIR)/lib -L ../../../mapkeeper/thrift/gen-cpp \ + -L ../../build -L ../../../stasis/build/src/stasis \ + -Wl,-rpath,\$$ORIGIN/../../../build \ + -Wl,-rpath,\$$ORIGIN/../../../../stasis/build/src/stasis \ + -Wl,-rpath,\$$ORIGIN/../../../../mapkeeper/thrift/gen-cpp \ + -Wl,-rpath,/usr/local/lib \ + -Wl,-rpath,$(THRIFT_DIR)/lib -CXXSRC = LSMServerHandler.cc +all: main/blsm_client main/blsm_server -LCLEAN += *~ -WARN += -Werror -Wall -LINC += -I. -I /usr/local/include/thrift -I /home/y/include64/stasis -I .. -I ../../thrift/gen-cpp +main/blsm_client : -LDLIBS += -L/usr/local/lib -LDFLAGS += -Wl,-rpath,/home/y/lib64 -Wl,-rpath,../build +main/blsm_server : LSMServerHandler.cc - -# Poor packaging for yicu -LINC += -I/home/y/include/yicu - -LDLIBS += -lthrift -lmapkeeper -lstasis -llogstore -L ../build -L ../../thrift/gen-cpp - -# Need to remove potential warnings in yapache. -LDEF += -DEAPI -LDEF += -D_FILE_OFFSET_BITS=64 - -ifdef UNIT_TEST -CXXFLAGS += -O0 -g -DUNIT_TEST -endif - -ifdef DEBUG -CXXFLAGS += -O0 -g -endif - -include $(ROOT)/share/yahoo_cfg/Make.rules - -$(SOTARGET): $(OBJS) +clean: + rm -f main/blsm_client main/blsm_server diff --git a/servers/mapkeeper/Makefile.local b/servers/mapkeeper/Makefile.local deleted file mode 100644 index a5e98f7..0000000 --- a/servers/mapkeeper/Makefile.local +++ /dev/null @@ -1,25 +0,0 @@ -THRIFT_DIR = /home/sears/local/thrift - -CPPFLAGS =-I../../../stasis -I../.. -I. -I $(THRIFT_DIR)/include/thrift -I../../../mapkeeper/thrift/gen-cpp -CXXFLAGS =-g -O3 - -LDFLAGS=-lpthread -llogstore -lstasis -lmapkeeper -lthrift \ - -L $(THRIFT_DIR)/lib -L ../../../mapkeeper/thrift/gen-cpp \ - -L ../../build -L ../../../stasis/build/src/stasis \ - -Wl,-rpath,\$$ORIGIN/../../../build \ - -Wl,-rpath,\$$ORIGIN/../../../../stasis/build/src/stasis \ - -Wl,-rpath,\$$ORIGIN/../../../../mapkeeper/thrift/gen-cpp \ - -Wl,-rpath,/usr/local/lib \ - -Wl,-rpath,$(THRIFT_DIR)/lib - -all: main/lsm_client main/lsm_server main/lsm_shutdown - -main/lsm_client : -main/lsm_shutdown : - -main/lsm_server : LSMServerHandler.cc - -clean: - rm -f main/lsm_client main/lsm_server - -# $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS) diff --git a/servers/mapkeeper/Makefile.y b/servers/mapkeeper/Makefile.y new file mode 100644 index 0000000..b38f328 --- /dev/null +++ b/servers/mapkeeper/Makefile.y @@ -0,0 +1,38 @@ +ROOT=/home/y +include $(ROOT)/share/yahoo_cfg/Make.defs + +USE_OSE = no + +LIB_NAME = LSMServer +SHLIB_VERSION = 1 + +CXXSRC = LSMServerHandler.cc + +LCLEAN += *~ +WARN += -Werror -Wall +LINC += -I. -I /usr/local/include/thrift -I /home/y/include64/stasis -I .. -I ../../thrift/gen-cpp + +LDLIBS += -L/usr/local/lib +LDFLAGS += -Wl,-rpath,/home/y/lib64 -Wl,-rpath,../build + + +# Poor packaging for yicu +LINC += -I/home/y/include/yicu + +LDLIBS += -lthrift -lmapkeeper -lstasis -llogstore -L ../build -L ../../thrift/gen-cpp + +# Need to remove potential warnings in yapache. +LDEF += -DEAPI +LDEF += -D_FILE_OFFSET_BITS=64 + +ifdef UNIT_TEST +CXXFLAGS += -O0 -g -DUNIT_TEST +endif + +ifdef DEBUG +CXXFLAGS += -O0 -g +endif + +include $(ROOT)/share/yahoo_cfg/Make.rules + +$(SOTARGET): $(OBJS) diff --git a/servers/mapkeeper/main/lsm_client.cc b/servers/mapkeeper/main/blsm_client.cc similarity index 100% rename from servers/mapkeeper/main/lsm_client.cc rename to servers/mapkeeper/main/blsm_client.cc diff --git a/servers/mapkeeper/main/lsm_server.cc b/servers/mapkeeper/main/blsm_server.cc similarity index 100% rename from servers/mapkeeper/main/lsm_server.cc rename to servers/mapkeeper/main/blsm_server.cc