plugin build change

This commit is contained in:
李子铭 2024-08-08 09:18:02 +08:00
parent beed1eb899
commit b52b2b31b6
2 changed files with 47 additions and 7 deletions

View File

@ -1,3 +1,47 @@
.PHONY: tidy
tidy:
go get -u gitea.cdlsxd.cn/BaseSystem/plugin && go mod tidy
build-mac:
cd plugins; \
export GOOS=darwin; \
export GO111MODULE=on; \
export CGO_ENABLED=0; \
export GOPROXY=https://goproxy.cn,direct; \
cd ${name} && go build -o ../../pkg/mac/${name}.so .
build-win:
cd plugins; \
export GOOS=windows; \
export GOARCH=amd64; \
export GO111MODULE=on; \
export CGO_ENABLED=0; \
export GOPROXY=https://goproxy.cn,direct; \
cd ${name} && go build -o ../../pkg/win/${name}.so .
build-linux:
cd plugins; \
export GOOS=linux; \
export GOARCH=amd64; \
export CGO_ENABLED=0; \
export GOPROXY=https://goproxy.cn,direct; \
cd ${name} && go build -o ../../pkg/linux/${name}.so .
.PHONY: zltx
zltx:
make build-mac name=zltx && \
make build-linux name=zltx
.PHONY: union_pay_cpn
union_pay_cpn:
make build-mac name=union_pay_cpn && \
make build-linux name=union_pay_cpn
.PHONY: alipay_cpn
alipay_cpn:
make build-mac name=alipay_cpn && \
make build-linux name=alipay_cpn
.PHONY: weixin_cpn
weixin_cpn:
make build-mac name=weixin_cpn && \
make build-linux name=weixin_cpn
.PHONY: all
all: zltx union_pay_cpn alipay_cpn weixin_cpn

View File

@ -4,10 +4,6 @@ tidy:
.PHONY: build
build:
export GOOS=linux; \
export GOARCH=amd64; \
export CGO_ENABLED=0; \
export GOPROXY=https://goproxy.cn,direct; \
cd ${name} && go build -o ../../pkg/${name}.so .
.PHONY: zltx