-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (24 loc) · 1007 Bytes
/
Makefile
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
BUILD=build
VERSION=0.1.0
COMMIT=$(shell git rev-parse HEAD)
BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
LDFLAGS = -ldflags "-X main.VERSION=${VERSION} -X main.COMMIT=${COMMIT} -X main.BRANCH=${BRANCH}"
all: build
build: build-darwin-arm
build-darwin-arm:
GOOS=darwin GOARCH=arm64 go build ${LDFLAGS} -o ${BUILD}/ztmb-doh-proxy cmd/ztmb-doh-proxy/*.go
GOOS=darwin GOARCH=arm64 go build ${LDFLAGS} -o ${BUILD}/ztmb-prover cmd/ztmb-prover/*.go
GOOS=darwin GOARCH=arm64 go build ${LDFLAGS} -o ${BUILD}/ztmb-wo-zkp cmd/ztmb-wo-zkp/*.go
build-linux-amd:
GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o ${BUILD}/ztmb-doh-proxy cmd/ztmb-doh-proxy/*.go
GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o ${BUILD}/ztmb-prover cmd/ztmb-prover/*.go
GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o ${BUILD}/ztmb-wo-zkp cmd/ztmb-wo-zkp/*.go
clean:
rm -vf ${BUILD}/*
fmt:
go fmt ./...
deps:
go mod tidy
test:
go test ${GO_FILES} -v
.PHONY: all build build-darwin-arm build-linux-amd clean fmt deps test