27 lines
460 B
Makefile
27 lines
460 B
Makefile
PLUGIN_NAME = mycelium-cni
|
|
CNI_PLUGINS_DIR = /opt/cni/bin
|
|
CNI_CONFIG_DIR = /etc/cni/net.d
|
|
|
|
.PHONY: build install clean test
|
|
|
|
build:
|
|
go build -o $(PLUGIN_NAME) .
|
|
|
|
install: build
|
|
sudo cp $(PLUGIN_NAME) $(CNI_PLUGINS_DIR)/
|
|
sudo cp 10-mycelium.conflist $(CNI_CONFIG_DIR)/
|
|
|
|
clean:
|
|
rm -f $(PLUGIN_NAME)
|
|
sudo rm -f $(CNI_PLUGINS_DIR)/$(PLUGIN_NAME)
|
|
sudo rm -f $(CNI_CONFIG_DIR)/10-mycelium.conflist
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
|
|
vet:
|
|
go vet ./...
|