-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (32 loc) · 1017 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
35
36
37
38
39
40
41
42
43
44
# Copyright 2019 Eryx <evorui аt gmаil dοt cοm>, All rights reserved.
#
BUILDCOLOR="\033[34;1m"
BINCOLOR="\033[37;1m"
ENDCOLOR="\033[0m"
ifndef V
QUIET_BUILD = @printf '%b %b\n' $(BUILDCOLOR)BUILD$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2;
QUIET_INSTALL = @printf '%b %b\n' $(BUILDCOLOR)INSTALL$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2;
endif
EXE_CLI = bin/kvgo-cli
APP_PATH = /usr/local/bin/kvgo-cli
BINDATA_CMD = httpsrv-bindata
BINDATA_ARGS_WEBUI = -src webui/ -dst bindata/webui/ -inc htm,js,css,svg
all: bindata_build bin_build
@echo ""
@echo "build complete"
@echo ""
bin_build:
$(QUIET_BUILD)go build -o ${EXE_CLI} cmd/kvgo-cli/main.go $(CCLINK)
bin_clean:
rm -f ${EXE_CLI}
bindata_build:
$(QUIET_BUILD)go get -u github.com/hooto/httpsrv-bindata $(CCLINK)
$(QUIET_BUILD)$(BINDATA_CMD) $(BINDATA_ARGS_WEBUI) $(CCLINK)
bindata_clean:
rm -f bindata/webui/statik.go
install:
install -m 755 ${EXE_CLI} ${APP_PATH}
clean: bin_clean bindata_clean
@echo ""
@echo "clean complete"
@echo ""