forked from subspacecommunity/subspace
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
22 lines (16 loc) · 772 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.DEFAULT_GOAL := help
.PHONY: help
BUILD_VERSION?=unknown
help: ## Display this help message and exit
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
build: clean ## Build the binary
@echo "Creating bindata.go..."
@go run github.com/kevinburke/go-bindata/go-bindata -o cmd/subspace/bindata.go --prefix "web/" --pkg main web/...
@echo "+++ bindata.go created"
@echo "Compiling subspace..."
@CGO_ENABLED=0 \
go build -v --compiler gc --ldflags "-extldflags -static -s -w -X main.version=${BUILD_VERSION}" -o subspace ./cmd/subspace \
&& rm cmd/subspace/bindata.go
@echo "+++ subspace compiled"
clean: ## Remove old binaries
rm -f subspace cmd/subspace/bindata.go