-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile.libs
45 lines (36 loc) · 1.22 KB
/
makefile.libs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
MAKEFILE_LIB = MAKEFILE_LIB_LOADED
ifeq ($(PROJ_BASE),)
PROJ_BASE := .
endif
BUILD := $(shell mkdir -p $(PROJ_BASE)/build;cd $(PROJ_BASE)/build;pwd)
LIBS_DIR := $(shell mkdir -p $(BUILD)/libs;cd $(BUILD)/libs;pwd)
# project lib dir
LIB_PROJ := -L $(LIBS_DIR)
# moss lib
INC_MOSS := -I $(PROJ_BASE)/src
LIB_MOSS := -lMoss
# gtest lib
INC_GTEST := -I $(PROJ_BASE)/third_party/googletest/googletest/include
LIB_DIR_GTEST := -L $(PROJ_BASE)/third_party/build/googletest/lib
LIB_GTEST := -lgtest
# glog lib
INC_GLOG := -I $(PROJ_BASE)/third_party/glog/src
LIB_DIR_GLOG := -L $(PROJ_BASE)/third_party/glog/.libs
LIB_GLOG := -lglog
# protobuf lib
INC_PROTOBUF := -I $(PROJ_BASE)/third_party/protobuf/src
LIB_DIR_PROTOBUF := -L $(PROJ_BASE)/third_party/protobuf/src/.libs
LIB_PROTOBUF := -lprotobuf
# libco lib
INC_LIBCO := -I $(PROJ_BASE)/third_party/libco
LIB_DIR_LIBCO := -L $(PROJ_BASE)/third_party/libco/lib
LIB_LIBCO := -lcolib -ldl
# Test proto
INC_TEST_PROTO := -I $(PROJ_BASE)/test/proto
LIB_TEST_PROTO := -lTestProto
# include path
INC += $(INC_GLOG) $(INC_PROTOBUF) $(INC_LIBCO)
# lib dir path
LIB_DIR += $(LIB_PROJ) $(LIB_DIR_GLOG) $(LIB_DIR_PROTOBUF) $(LIB_DIR_LIBCO)
# lib files
LIB += -lpthread $(LIB_GLOG) $(LIB_PROTOBUF) $(LIB_LIBCO)