forked from baidu/ins
-
Notifications
You must be signed in to change notification settings - Fork 1
/
COMAKE
executable file
·67 lines (49 loc) · 2.73 KB
/
COMAKE
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#edit-mode: -*- python -*-
#coding:gbk
#工作路径.
WORKROOT('../../../')
#使用硬链接copy.
CopyUsingHardLink(True)
#支持32位/64位平台编译
#ENABLE_MULTI_LIBS(True)
#C预处理器参数.
CPPFLAGS('-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -DVERSION=\\\"0.0.0.1\\\"')
#为32位目标编译指定额外的预处理参数
#CPPFLAGS_32('-D_XOPEN_SOURE=500')
#C编译参数.
CFLAGS('-g -pipe -W -Wall -fPIC')
#C++编译参数.
CXXFLAGS('-g -pipe -W -Wall -Werror -fPIC')
PROTOC('../../../third-64/protobuf/bin/protoc')
#链接参数.
LDFLAGS('-lleveldb -lpthread -lcrypto -lrt -lz -L ./thirdparty/leveldb')
#依赖模块
CONFIGS('ps/opensource/sofa-pbrpc@trunk@COMAKE')
CONFIGS('third-64/[email protected]')
CONFIGS('third-64/gflags@gflags_2-0-0-100_PD_BL')
CONFIGS('third-64/tcmalloc@base')
INCPATHS('. ./src ./output/include ./thirdparty/leveldb/include')
ins_sources = 'server/ins_main.cc server/ins_node_impl.cc server/flags.cc \
server/user_manage.cc server/performance_center.cc common/logging.cc \
storage/meta.cc storage/binlog.cc storage/storage_manage.cc proto/ins_node.proto'
ins_sdk_sources = 'sdk/ins_sdk.cc common/logging.cc proto/ins_node.proto server/flags.cc'
ins_sdk_headers = 'sdk/ins_sdk.h'
ins_python_sources = 'sdk/ins_sdk.cc sdk/ins_wrapper.cc common/logging.cc proto/ins_node.proto server/flags.cc'
ins_cli_sources = 'sdk/ins_sdk.cc proto/ins_node.proto common/logging.cc common/tprinter.cc sdk/ins_cli.cc server/flags.cc'
sample_sources = 'sdk/sample.cc'
binlog_test_sources = 'storage/binlog.cc storage/binlog_test.cc common/logging.cc proto/ins_node.proto'
user_manage_test_sources = 'server/user_manage.cc server/user_manage_test.cc common/logging.cc proto/ins_node.proto'
storage_manage_test_sources = 'storage/storage_manage.cc storage/storage_manage_test.cc server/flags.cc common/logging.cc proto/ins_node.proto'
performance_center_test_sources = 'server/performance_center.cc server/performance_center_test.cc server/flags.cc'
TARGET('nexus_ldb', ShellCommands('cd thirdparty/leveldb && make'))
Application('ins', Sources(ins_sources), Depends('nexus_ldb'))
Application('ins_cli', Sources(ins_cli_sources))
SharedLibrary('ins_py', Sources(ins_python_sources), LinkDeps(True))
SharedLibrary('ins_sdk', Sources(ins_sdk_sources), LinkDeps(True))
StaticLibrary('ins_sdk', Sources(ins_sdk_sources), HeaderFiles(ins_sdk_headers))
TARGET('py_sdk_copy', ShellCommands('cp sdk/ins_sdk.py output/so/'), Prefixes('libins_py.so'))
Application('binlog_test', Sources(binlog_test_sources))
Application('storage_manage_test', Sources(storage_manage_test_sources))
Application('user_manage_test', Sources(user_manage_test_sources))
Application('performance_center_test', Sources(performance_center_test_sources))
Application('sample', Sources(sample_sources), Libraries('libins_sdk.a'))