-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·54 lines (42 loc) · 1.31 KB
/
Makefile
File metadata and controls
executable file
·54 lines (42 loc) · 1.31 KB
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
kws := KWS_Core
NETWORK := ovn
CTL_IP := 10.5.15.39
IP :=
DNS :=
IFACE ?= ens3
.PHONY: build run clean conf test test-v lint fmt ovn-install ovn-cluster ovn-worker
conf:
./build/go.sh
./build/download.sh
./build/autoconfig.sh
ifeq ($(NETWORK),ovn)
./build/apparmor.sh
endif
$(MAKE) build
build: main.go
go build -ldflags "-X 'github.com/easy-cloud-Knet/KWS_Core/vm/parsor.NetworkMode=$(NETWORK)'" -o $(kws) .
run: build
chmod +x ./$(kws)
./$(kws)
# OVN/OVS 소스 빌드 설치 (최초 1회)
ovn-install:
./build/sdnConf.sh
# 컨트롤 노드: make ovn-cluster IP=10.5.15.39 DNS=10.5.15.1 [IFACE=eno1]
ovn-cluster:
@test -n "$(IP)" || { echo "usage: make ovn-cluster IP=x.x.x.x DNS=x.x.x.x [IFACE=eno1]"; exit 1; }
./build/ovn-cluster.sh $(IP) $(DNS) $(IFACE)
# 워커 노드: make ovn-worker IP=10.5.15.40 DNS=10.5.15.1 [CTL_IP=x.x.x.x] [IFACE=ens3]
ovn-worker:
@test -n "$(IP)" || { echo "usage: make ovn-worker IP=x.x.x.x DNS=x.x.x.x [CTL_IP=x.x.x.x] [IFACE=ens3]"; exit 1; }
./build/ovn-worker.sh $(IP) $(DNS) $(CTL_IP) $(IFACE)
fmt:
go fmt ./...
lint:
@which golangci-lint > /dev/null 2>&1 || { echo "installing golangci-lint..."; go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest; }
golangci-lint run ./...
test:
go test ./...
test-v:
go test -v ./...
clean:
rm -rf $(kws)