Skip to content

Commit

Permalink
brand new pika2.0 comming
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelMaker committed Jan 12, 2016
1 parent 2d4f692 commit 841d07e
Show file tree
Hide file tree
Showing 82 changed files with 97 additions and 17,829 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "third/glog"]
path = third/glog
url = [email protected]:CatKang/glog.git
[submodule "third/pink"]
path = third/pink
url = [email protected]:baotiao/pink.git
45 changes: 27 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@ LFLAGS = -Wl,-rpath=$(RPATH)

OSVERSION := $(shell cat /etc/redhat-release | cut -d "." -f 1 | awk '{print $$NF}')
ifeq ($(OSVERSION), 5)
SO_DIR = ./lib/5.4
TOOLS_DIR = ./tools/5.4
SO_DIR = $(CURDIR)/lib/5.4
TOOLS_DIR = $(CURDIR)/tools/5.4
else
SO_DIR = ./lib/6.2
TOOLS_DIR = ./tools/6.2
SO_DIR = $(CURDIR)/lib/6.2
TOOLS_DIR = $(CURDIR)/tools/6.2
endif

CXX = g++
CXXFLAGS = -Wall -W -DDEBUG -g -O0 -D__XDEBUG__ -fPIC -Wno-unused-function -std=c++11

ifeq ($(__REL), 1)
#CXXFLAGS = -Wall -W -DDEBUG -g -O0 -D__XDEBUG__ -fPIC -Wno-unused-function -std=c++11
CXXFLAGS = -O2 -g -pipe -fPIC -W -DNDEBUG -Wwrite-strings -Wpointer-arith -Wreorder -Wswitch -Wsign-promo -Wredundant-decls -Wformat -Wall -D_GNU_SOURCE -D__STDC_FORMAT_MACROS -std=c++11 -gdwarf-2 -Wno-redundant-decls
else
CXXFLAGS = -O0 -g -pg -pipe -fPIC -W -DDEBUG -Wwrite-strings -Wpointer-arith -Wreorder -Wswitch -Wsign-promo -Wredundant-decls -Wformat -Wall -D_GNU_SOURCE -std=c++11 -D__STDC_FORMAT_MACROS -std=c++11 -gdwarf-2 -Wno-redundant-decls
endif

OBJECT = pika
SRC_DIR = ./src
THIRD_PATH = ./third
Expand All @@ -23,26 +30,26 @@ INCLUDE_PATH = -I./include/ \
-I./src/ \
-I$(THIRD_PATH)/glog/src/ \
-I$(THIRD_PATH)/nemo/output/include/ \
-I$(THIRD_PATH)/mario/output/include/
-I$(THIRD_PATH)/pink/output/include/

LIB_PATH = -L./ \
-L$(THIRD_PATH)/nemo/output/lib/ \
-L$(THIRD_PATH)/mario/output/lib/
-L$(THIRD_PATH)/pink/output/lib/


LIBS = -lpthread \
-lglog \
-lnemo \
-lmario \
-lrocksdb \
-lpink \
-lz \
-lbz2 \
-lsnappy \
-lrt

ROCKSDB = $(THIRD_PATH)/nemo/output/lib/librocksdb.a
GLOG = /usr/local/lib/libglog.a
MARIO = $(THIRD_PATH)/mario/output/lib/libmario.a
NEMO = $(THIRD_PATH)/nemo/output/lib/libnemo.a
GLOG = $(SO_DIR)/libglog.so.0
PINK = $(THIRD_PATH)/pink/output/lib/libpink.a

.PHONY: all clean

Expand All @@ -67,25 +74,27 @@ all: $(OBJECT)
@echo "Success, go, go, go..."


$(OBJECT): $(ROCKSDB) $(GLOG) $(MARIO) $(OBJS)
$(OBJECT): $(NEMO) $(GLOG) $(PINK) $(OBJS)
$(CXX) $(CXXFLAGS) -o $@ $(OBJS) $(INCLUDE_PATH) $(LIB_PATH) $(LFLAGS) $(LIBS)

$(ROCKSDB):
$(NEMO):
make -C $(THIRD_PATH)/nemo/

$(GLOG):
cd $(THIRD_PATH)/glog; ./configure; make; echo '*' > $(CURDIR)/third/glog/.gitignore; sudo make install;

$(MARIO):
make -C $(THIRD_PATH)/mario/
$(PINK):
make -C $(THIRD_PATH)/pink/

$(OBJS): %.o : %.cc
$(CXX) $(CXXFLAGS) -c $< -o $@ $(INCLUDE_PATH)

$(TOBJS): %.o : %.cc
$(CXX) $(CXXFLAGS) -c $< -o $@ $(INCLUDE_PATH)

glog:
rm -rf $(GLOG);
cd $(THIRD_PATH)/glog; make distclean; ./configure; make; echo '*' > $(CURDIR)/third/glog/.gitignore; cp $(CURDIR)/third/glog/.libs/libglog.so.0 $(SO_DIR);

clean:
rm -rf $(SRC_DIR)/*.o
rm -rf $(OUTPUT)/*
rm -rf $(OUTPUT)

225 changes: 0 additions & 225 deletions include/atomic_pointer.h

This file was deleted.

40 changes: 0 additions & 40 deletions include/base_conf.h

This file was deleted.

Loading

0 comments on commit 841d07e

Please sign in to comment.