-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathMakefile.vars
More file actions
137 lines (117 loc) · 4.52 KB
/
Copy pathMakefile.vars
File metadata and controls
137 lines (117 loc) · 4.52 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
MKDIR = -mkdir -p 2>/dev/null
CP = -cp -r 2>/dev/null
RM = -rm -r 2>/dev/null
LDCONFIG = -ldconfig 2>/dev/null
PREFIX ?= /usr/local
INSTALL_INCDIR ?= $(PREFIX)/include/hv
INSTALL_LIBDIR ?= $(PREFIX)/lib
PKG_CONFIG ?= pkg-config
# lua
LUA_PKG_CONFIG ?= $(shell if command -v $(PKG_CONFIG) >/dev/null 2>&1 && $(PKG_CONFIG) --exists lua; then echo lua; fi)
LUA_PREFIX ?= $(shell for dir in /opt/homebrew/opt/lua /usr/local/opt/lua /usr; do if [ -f "$$dir/include/lua/lua.h" ] || [ -f "$$dir/include/lua.h" ]; then echo $$dir; break; fi; done)
LUA_INCLUDE_DIR ?= $(shell if [ -n "$(LUA_PREFIX)" ]; then for dir in "$(LUA_PREFIX)/include/lua" "$(LUA_PREFIX)/include/lua5.5" "$(LUA_PREFIX)/include/lua5.4" "$(LUA_PREFIX)/include/lua5.3" "$(LUA_PREFIX)/include"; do if [ -f "$$dir/lua.h" ]; then echo $$dir; break; fi; done; fi)
LUA_CFLAGS ?= $(shell if [ -n "$(LUA_PKG_CONFIG)" ]; then $(PKG_CONFIG) --cflags $(LUA_PKG_CONFIG); elif [ -n "$(LUA_INCLUDE_DIR)" ]; then echo -I$(LUA_INCLUDE_DIR); fi)
LUA_LIBS ?= $(shell if [ -n "$(LUA_PKG_CONFIG)" ]; then $(PKG_CONFIG) --libs $(LUA_PKG_CONFIG); elif [ -n "$(LUA_PREFIX)" ]; then echo -L$(LUA_PREFIX)/lib -llua; else echo -llua; fi)
# quickjs
QUICKJS_ROOT ?= $(shell for dir in /opt/homebrew/opt/quickjs /usr/local/opt/quickjs /usr; do if [ -f "$$dir/include/quickjs/quickjs.h" ] || [ -f "$$dir/include/quickjs.h" ]; then echo $$dir; break; fi; done)
QUICKJS_INCLUDE_DIR ?= $(shell if [ -n "$(QUICKJS_ROOT)" ]; then for dir in "$(QUICKJS_ROOT)/include/quickjs" "$(QUICKJS_ROOT)/include"; do if [ -f "$$dir/quickjs.h" ]; then echo $$dir; break; fi; done; fi)
QUICKJS_LIB_DIR ?= $(shell if [ -n "$(QUICKJS_ROOT)" ]; then for dir in "$(QUICKJS_ROOT)/lib/quickjs" "$(QUICKJS_ROOT)/lib"; do if [ -f "$$dir/libquickjs.a" ] || [ -f "$$dir/libquickjs.dylib" ] || [ -f "$$dir/libquickjs.so" ]; then echo $$dir; break; fi; done; fi)
JS_CFLAGS ?= $(shell if [ -n "$(QUICKJS_INCLUDE_DIR)" ]; then echo -I$(QUICKJS_INCLUDE_DIR); fi)
JS_LIBS ?= $(shell if [ -n "$(QUICKJS_LIB_DIR)" ]; then echo -L$(QUICKJS_LIB_DIR) -lquickjs; else echo -lquickjs; fi)
BASE_HEADERS = base/hplatform.h\
\
base/hdef.h\
base/hatomic.h\
base/herr.h\
base/htime.h\
base/hmath.h\
base/hbase.h\
base/hversion.h\
base/hsysinfo.h\
base/hproc.h\
base/hthread.h\
base/hmutex.h\
base/hsocket.h\
base/hlog.h\
base/hbuf.h\
base/hmain.h\
base/hendian.h\
SSL_HEADERS = ssl/hssl.h
EVENT_HEADERS = event/hloop.h\
event/nlog.h\
event/hdns.h\
UTIL_HEADERS = util/base64.h\
util/md5.h\
util/sha1.h\
CPPUTIL_HEADERS = cpputil/hmap.h\
cpputil/hstring.h\
cpputil/hfile.h\
cpputil/hpath.h\
cpputil/hdir.h\
cpputil/hurl.h\
cpputil/hscope.h\
cpputil/hthreadpool.h\
cpputil/hasync.h\
cpputil/hobjectpool.h\
cpputil/ifconfig.h\
cpputil/iniparser.h\
cpputil/json.hpp\
cpputil/singleton.h\
cpputil/LRUCache.h\
cpputil/ThreadLocalStorage.h\
EVPP_HEADERS = evpp/Buffer.h\
evpp/Channel.h\
evpp/Event.h\
evpp/EventLoop.h\
evpp/EventLoopThread.h\
evpp/EventLoopThreadPool.h\
evpp/Status.h\
evpp/TcpClient.h\
evpp/TcpServer.h\
evpp/UdpClient.h\
evpp/UdpServer.h\
evpp/TLVMessage.h\
evpp/TLVChannel.h\
evpp/TLVClient.h\
evpp/TLVServer.h\
REDIS_HEADERS = redis/RedisMessage.h\
redis/AsyncRedisClient.h\
redis/RedisClient.h\
redis/RedisPipeline.h\
redis/RedisTransaction.h\
redis/RedisSubscriber.h\
# hrpc headers (installed to include/hv/rpc/ when WITH_RPC).
# rpc.pb.h is generated by protoc at build time and copied alongside these.
RPC_HEADERS = rpc/rpc_protocol.h\
rpc/RpcService.h\
rpc/RpcClient.h\
rpc/RpcServer.h\
PROTOCOL_HEADERS = protocol/icmp.h\
protocol/dns.h\
protocol/ftp.h\
protocol/smtp.h
HTTP_HEADERS = http/httpdef.h\
http/wsdef.h\
http/http_content.h\
http/HttpMessage.h\
http/HttpParser.h\
http/WebSocketParser.h\
http/WebSocketChannel.h\
HTTP2_HEADERS = http/http2def.h\
http/grpcdef.h\
HTTP_CLIENT_HEADERS = http/client/HttpClient.h\
http/client/requests.h\
http/client/axios.h\
http/client/AsyncHttpClient.h\
http/client/WebSocketClient.h\
HTTP_SERVER_HEADERS = http/server/HttpServer.h\
http/server/HttpService.h\
http/server/HttpContext.h\
http/server/HttpResponseWriter.h\
http/server/WebSocketServer.h\
MQTT_HEADERS = mqtt/mqtt_protocol.h\
mqtt/mqtt_client.h
LUA_HEADERS = lua/hvlua.h\
lua/hvlua_util.h\
lua/hvlua_json.h
JS_HEADERS = js/hvjs.h