diff --git a/Makefile b/Makefile index bcdf4ea..7b533f5 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,47 @@ -.PHONY: tidy -tidy: - go get -u gitea.cdlsxd.cn/BaseSystem/plugin && go mod tidy \ No newline at end of file +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 \ No newline at end of file diff --git a/plugins/Makefile b/plugins/Makefile index a99e3d9..aa1675d 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -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