Makefile
886 Bytes
all: gen game
IMGTIME := $(shell date "+%G%m%d_%H%M%S")
pname = plugin-$(IMGTIME).so
gen:
protoc -I./protos --go_out=./protos --go-grpc_out=./protos ./protos/*proto
protoc-go-inject-tag -input=./pb/*.pb.go
test:
go run cmd/test/client.go
http:
go run -race cmd/httpserver/http.go cmd/httpserver/AccountAction.go
game:
go run -race cmd/gameserver/*.go
build:
go build -race -o bin/account cmd/http.go
go build -race -o bin/game cmd/gameserver/*.go
go build -race -o bin/test cmd/test/client.go
regame:plugin
lsof -i:8849 | grep "game" | grep -v grep | awk '{print $$2}' | xargs -I {} kill -USR1 {}
plugin:
#go build -ldflags -pluginpath="plugin/hot-1" --buildmode=plugin -o bin/plugin.so src/plugin/*.go
go build --buildmode=plugin -o bin/$(pname) src/plugin/*.go
cd bin && rm -rf plugin.so && ln -s $(pname) plugin.so && cd -
.PHONY: all build protos test cert plugin