Added separate make targets for CNI and CNM

This commit is contained in:
Onur Filiz 2016-10-11 15:53:41 -07:00
Родитель 431e7b0eb9
Коммит ba7c9df4e5
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -1,4 +1,5 @@
SOURCEFILES = \
$(wildcard cni/*.go) \
$(wildcard cnm/*.go) \
$(wildcard common/*.go) \
$(wildcard ebtables/*.go) \
@ -8,12 +9,15 @@ SOURCEFILES = \
$(wildcard network/*.go) \
$(wildcard store/*.go)
OUTPUTDIR = dist
OUTPUTDIR = out
VERSION ?= $(shell git describe --tags --always --dirty)
ENSURE_OUTPUTDIR_EXISTS := $(shell mkdir -p $(OUTPUTDIR))
# Shorthand target names for convenience.
azure-cnm-plugin: $(OUTPUTDIR)/azure-cnm-plugin
azure-cni-plugin: $(OUTPUTDIR)/azure-cni-plugin
# Clean all build artifacts.
.PHONY: clean
@ -21,8 +25,12 @@ clean:
rm -rf $(OUTPUTDIR)
# Build the Azure CNM plugin.
dist/azure-cnm-plugin: $(SOURCEFILES)
go build -v -o azure-cnm-plugin -ldflags "-X main.version=$(VERSION) -s -w" cnm/cnm.go
$(OUTPUTDIR)/azure-cnm-plugin: $(SOURCEFILES)
go build -v -o $(OUTPUTDIR)/azure-cnm-plugin -ldflags "-X main.version=$(VERSION) -s -w" cnm/cnm.go
# Build the Azure CNI plugin.
$(OUTPUTDIR)/azure-cni-plugin: $(SOURCEFILES)
go build -v -o $(OUTPUTDIR)/azure-cni-plugin -ldflags "-X main.version=$(VERSION) -s -w" cni/cni.go
install:
go install github.com/Azure/azure-container-networking/cnm