1 Star 0 Fork 235

周旺旺/zinx

forked from 刘丹冰Aceld/zinx 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
xm-tech 提交于 2022-11-13 19:14 . test cover
.PHONY: build
SERVICE := zinx
CUR_PWD := $(shell pwd)
SERVER_DEMO_PATH := $(CUR_PWD)/examples/zinx_server
CLIENT_DEMO_PATH := $(CUR_PWD)/examples/zinx_client
SERVER_DEMO_BIN := $(SERVER_DEMO_PATH)/server
CLIENT_DEMO_BIN := $(CLIENT_DEMO_PATH)/client
AUTHOR := $(shell git log --pretty=format:"%an"|head -n 1)
VERSION := $(shell git rev-list HEAD | head -1)
BUILD_INFO := $(shell git log --pretty=format:"%s" | head -1)
BUILD_DATE := $(shell date +%Y-%m-%d\ %H:%M:%S)
export GO111MODULE=on
LD_FLAGS='-X "$(SERVICE)/version.TAG=$(TAG)" -X "$(SERVICE)/version.VERSION=$(VERSION)" -X "$(SERVICE)/version.AUTHOR=$(AUTHOR)" -X "$(SERVICE)/version.BUILD_INFO=$(BUILD_INFO)" -X "$(SERVICE)/version.BUILD_DATE=$(BUILD_DATE)"'
TEST_FILES := znet/acceptdelay_test.go znet/acceptdelay.go
default: build
build:
go build -ldflags $(LD_FLAGS) -gcflags "-N" -o $(SERVER_DEMO_BIN) $(SERVER_DEMO_PATH)/main.go
go build -ldflags $(LD_FLAGS) -gcflags "-N" -o $(CLIENT_DEMO_BIN) $(CLIENT_DEMO_PATH)/main.go
test:
go test -v -cover $(TEST_FILES)
clean:
rm $(SERVER_DEMO_BIN)
rm $(CLIENT_DEMO_BIN)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/wangwang2020/zinx.git
git@gitee.com:wangwang2020/zinx.git
wangwang2020
zinx
zinx
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385