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
This commit is contained in:
sears 2012-02-22 23:42:54 +00:00
parent 0a2ff65814
commit cc067deb76
6 changed files with 60 additions and 63 deletions

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)