From bed774467ad27c980b971f040996bff0f557a565 Mon Sep 17 00:00:00 2001 From: sears Date: Wed, 21 Dec 2011 21:05:29 +0000 Subject: [PATCH] Add simple makefile for building static binaries git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@3506 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe --- Makefile | 15 +++++++++++++++ newserver.cpp => main/newserver.cpp | 0 server.cpp => main/server.cpp | 0 sherpa/Makefile.local | 6 +++--- 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 Makefile rename newserver.cpp => main/newserver.cpp (100%) rename server.cpp => main/server.cpp (100%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..68dbf73 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +INC = -I ../stasis \ + -I ../mapkeeper/thrift/gen-cpp/ \ + -I ../../local/thrift/include/ \ + -I ../../local/thrift/include/thrift \ + -I ./sherpa + +LIBSRC = $(wildcard *.c) $(wildcard *.cpp) +LIBNAME = logstore + +STATIC_LIBS= ./libstdc++.a ../mapkeeper/thrift/gen-cpp/libmapkeeper.a \ + -lrt sherpa/LSMServerHandler.cc bin/liblogstore.a \ + ../stasis/bin/libstasis.a +MAINSRC = $(wildcard main/*.cpp) $(wildcard sherpa/main/*.cc) + +include ../stasis/config/Makefile.stasis \ No newline at end of file diff --git a/newserver.cpp b/main/newserver.cpp similarity index 100% rename from newserver.cpp rename to main/newserver.cpp diff --git a/server.cpp b/main/server.cpp similarity index 100% rename from server.cpp rename to main/server.cpp diff --git a/sherpa/Makefile.local b/sherpa/Makefile.local index 822b48a..1bbf41f 100644 --- a/sherpa/Makefile.local +++ b/sherpa/Makefile.local @@ -1,9 +1,9 @@ -THRIFT_DIR = /usr/local +THRIFT_DIR = /home/sears/local/thrift CPPFLAGS =-I../../stasis -I.. -I. -I $(THRIFT_DIR)/include/thrift -I../../mapkeeper/thrift/gen-cpp -CXXFLAGS =-g -O0 +CXXFLAGS =-g -O3 -LDFLAGS=-lprofiler -ltcmalloc -lpthread -llogstore -lstasis -lmapkeeper -lthrift \ +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 \