generated from octoposprime/temp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (28 loc) · 898 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
GREEN := $(shell tput -Txterm setaf 2)
YELLOW := $(shell tput -Txterm setaf 3)
WHITE := $(shell tput -Txterm setaf 7)
CYAN := $(shell tput -Txterm setaf 6)
RESET := $(shell tput -Txterm sgr0)
.PHONY: all generate help
all: help
## Generate:
proto-generate: ## Protobuf Generate
protoc -I=pkg/proto/model \
--go_out=../../../ \
--go-grpc_out=../../../ \
pkg/proto/model/tick.proto \
pkg/proto/model/led.proto \
pkg/proto/model/button.proto \
pkg/proto/model/dlr.proto \
--experimental_allow_proto3_optional
## Help:
help: ## Show this help.
@echo ''
@echo 'Usage:'
@echo ' ${YELLOW}make${RESET} ${GREEN}<target>${RESET}'
@echo ''
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*?## "} { \
if (/^[a-zA-Z_-]+:.*?##.*$$/) {printf " ${YELLOW}%-20s${GREEN}%s${RESET}\n", $$1, $$2} \
else if (/^## .*$$/) {printf " ${CYAN}%s${RESET}\n", substr($$1,4)} \
}' $(MAKEFILE_LIST)