-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (35 loc) · 1016 Bytes
/
Makefile
File metadata and controls
46 lines (35 loc) · 1016 Bytes
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
all : help
.PHONY: proto copy schema autocode dist format luacheck
help:
@echo "支持下面命令:"
@awk '/^#/{comment=substr($$0,2)} /^[a-zA-Z0-9_-]+:/{gsub(/:/, ""); if(comment)printf "make %-12s #%s\n", $$1, comment; comment=""}' $(MAKEFILE_LIST)
include build.mk
# 初始化 submodule
init:
git submodule update --init --recursive
# 拷贝 3rd 里必要的 lua 文件
copy:
# 这些lua文件直接拷贝,因此如果需要修改,则应该取改 3rd 目录下的原文件
cp -rf 3rd/sproto-orm/orm $(LUA_LIB_PATH)/
cp -f 3rd/binaryheap.lua/src/binaryheap.lua $(LUA_LIB_PATH)/
# 编译协议
proto:
@mkdir -p build/proto
./tools/gen_proto.sh
# 编译 ORM 模式文件
schema:
./tools/gen_schema.sh
# 生成代码
autocode:
./bin/lua tools/run.lua tools/gen_roleagent_modules.lua
# 格式化 lua 代码
format:
@echo "Formatting Lua files with stylua..."
@stylua .
# 检查 lua 代码
lint:
@echo "Checking Lua files with luacheck..."
@luacheck .
# 打包
dist: build
./tools/dist.sh