-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (24 loc) · 883 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
.PHONY: proto
default: build
LD_FLAGS=""
BINARY_NAME=sample-twirp
proto: ## Compile protocol files
@protoc \
--proto_path=./vendor \
--proto_path=. \
--twirp_out=. \
--go_out=. \
--descriptor_set_out=proto/service.desc \
proto/*.proto
build: ## Build for local system
@go build -v -ldflags $(LD_FLAGS) -o $(BINARY_NAME)
linux: ## Build for AMD64 linux systems
@env GOOS=linux GOARCH=amd64 go build -v -ldflags $(LD_FLAGS) -o $(BINARY_NAME)-linux-amd64
install: ## Install to local machine
@go build -v -ldflags $(LD_FLAGS) -i -o ${GOPATH}/bin/$(BINARY_NAME)
deps-list: ## List installed vendor dependencies
dep status
deps-install: ## Install required vendor dependencies
dep ensure -v
help: ## Display available make targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-16s\033[0m %s\n", $$1, $$2}'