-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
57 lines (43 loc) · 1.15 KB
/
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
56
57
GOCMD=go
GOBUILD=${GOCMD} build
GOCLEAN=${GOCMD} clean
GOGET=${GOCMD} get
GOTEST=${GOCMD} test
GORUN=${GOCMD} run
BINARY_NAME=bin/GuestAgentTestExtension
WINDOWS_BIN=$(BINARY_NAME)_windows.exe
LINUX_BIN=$(BINARY_NAME)_linux
SERVICE_SCRIPT_BIN=bin/gatestext_script_linux
.PHONY: all
all: clean build_all
.PHONY: test
test:
${GOTEST} -v
.PHONY: build_all
build_all: build_windows build_linux
.PHONY: build_windows
build_windows:
$(GOCMD) env -w GOOS=windows
${GOBUILD} -o ${WINDOWS_BIN} ./main/
.PHONY: build_linux
build_linux:
$(GOCMD) env -w GOOS=linux
${GOBUILD} -o ${LINUX_BIN} ./main/
${GOBUILD} -o ${SERVICE_SCRIPT_BIN} ./services/
.PHONY: build_all_with_deps
build_all_with_deps: deps build_all
.PHONY: build_linux_with_deps
build_linux_with_deps: deps build_linux
.PHONY: build_windows_with_deps
build_windows_with_deps: deps build_windows
.PHONY: deps
deps:
${GOGET} -u "github.com/Azure/azure-extension-foundation/sequence"
${GOGET} -u "github.com/Azure/azure-extension-foundation/settings"
${GOGET} -u "github.com/Azure/azure-extension-foundation/status"
${GOGET} -u "github.com/pkg/errors"
.PHONY: clean
clean:
${GOCLEAN}
help:
@echo "TODO"