forked from nanovms/ops
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (34 loc) · 864 Bytes
/
Makefile
File metadata and controls
50 lines (34 loc) · 864 Bytes
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
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test ./...
GOGET=$(GOCMD) get
BINARY_NAME=ops
all: deps test build
pre-build:
do-build: pre-build
$(GOBUILD) -o $(BINARY_NAME) -v
post-build: do-build
build: post-build
pre-test:
do-test: pre-test
@GO111MODULE=on $(GOTEST) -v
post-test: do-test
test: post-test
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
run:
$(GOBUILD) -o $(BINARY_NAME) -v ./...
./$(BINARY_NAME)
deps:
@GO111MODULE=on go mod download
update-mocks:
mockgen --source=network/setup_network_interfaces.go > mock_network/setup_network_interfaces.go
mockgen --source=upcloud/upcloud.go > mock_upcloud/upcloud.go
mockgen --source=oci/oci.go > mock_oci/oci.go
.PHONY: all build test clean run deps
.PHONY: pre-build do-build post-build
.PHONY: pre-test do-test post-test
-include Makefile.local