-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
executable file
·36 lines (32 loc) · 1.12 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
BIN_DIR := /usr/local/bin
SYSTEMD_DIR := /etc/systemd/system
all:
cd proc; go install
go build cluster-smi.go config.go
go build cluster-smi-router.go config.go
go build cluster-smi-node.go config.go cluster.go
go build cluster-smi-local.go config.go cluster.go
clean:
cd proc; go clean
go clean
install:
install -v cluster-smi-local cluster-smi-node cluster-smi-router cluster-smi $(BIN_DIR)
install docs/cluster-smi-node.service $(SYSTEMD_DIR)
systemctl enable cluster-smi-node.service
systemctl start cluster-smi-node.service
uninstall:
systemctl disable cluster-smi-node.service
systemctl stop cluster-smi-node.service
rm -f $(SYSTEMD_DIR)/cluster-smi-node.service
rm -f $(BIN_DIR)/cluster-smi-local
rm -f $(BIN_DIR)/cluster-smi-node
rm -f $(BIN_DIR)/cluster-smi-router
rm -f $(BIN_DIR)/cluster-smi
install-router:
install docs/cluster-smi-router.service $(SYSTEMD_DIR)
systemctl enable cluster-smi-router.service
systemctl start cluster-smi-router.service
uninstall-router:
systemctl disable cluster-smi-router.service
systemctl stop cluster-smi-router.service
rm -f $(SYSTEMD_DIR)/cluster-smi-router.service