forked from 1340691923/ElasticView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (47 loc) · 888 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
45
46
47
48
49
50
51
52
53
54
55
Cmd = go
BinariesName = ElasticView
GoBuild = $(GoCmd) build -v -ldflags="-w -s" -o $(BinariesName)
VueBuild = cd vue; npm run build:prod; cd ../
RawOS = ""
ifeq ($OS, Windows_NT)
BinariesName = "ElasticView.exe"
RawOS = windows
else
ifeq ($(shell uname),Darwin)
BinariesName="ElasticView"
RawOS = darwin
else
BinariesName="ElasticView"
RawOS = linux
endif
endif
all: build
build:
$(VueBuild)
$(Cmd) clean
$(GBuild)
clean:
$(Cmd) clean
windows:
$(VueBuild)
export CGO_ENABLED=0
export GOOS=windows
export GOARCH=amd64
$(GBuild)
export GOOS=$(RawOS)
darwin:
$(VueBuild)
export CGO_ENABLED=0
export GOOS=darwin
export GOARCH=amd64
$(GBuild)
export GOOS=$(RawOS)
linux:
$(VueBuild)
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
$(GBuild)
export GOOS=$(RawOS)
help:
echo "flag support: build, clean, windows, darwin, linux"