3333# Interrogate the git repo and set some variables
3434REPO_ROOT ?= $(shell git rev-parse --show-toplevel)
3535REVISION ?= $(shell git rev-parse --short HEAD)
36- ACN_VERSION ?= $(shell git describe --exclude "azure-iptables-monitor* " --exclude "azure-ip-masq-merger* " --exclude "azure-ipam* " --exclude "dropgz* " --exclude "zapai* " --exclude "ipv6-hp-bpf* " --exclude "block-iptables* " --tags --always)
36+ ACN_VERSION ?= $(shell git describe --exclude "azure-iptables-monitor* " --exclude "azure-ip-masq-merger* " --exclude "azure-ipam* " --exclude "dropgz* " --exclude "zapai* " --exclude "ipv6-hp-bpf* " --exclude "azure- block-iptables* " --tags --always)
3737IPV6_HP_BPF_VERSION ?= $(notdir $(shell git describe --match "ipv6-hp-bpf* " --tags --always) )
38- BLOCK_IPTABLES_VERSION ?= $(notdir $(shell git describe --match "block-iptables* " --tags --always) )
38+ AZURE_BLOCK_IPTABLES_VERSION ?= $(notdir $(shell git describe --match "azure- block-iptables* " --tags --always) )
3939AZURE_IPAM_VERSION ?= $(notdir $(shell git describe --match "azure-ipam* " --tags --always) )
4040AZURE_IP_MASQ_MERGER_VERSION ?= $(notdir $(shell git describe --match "azure-ip-masq-merger* " --tags --always) )
4141AZURE_IPTABLES_MONITOR_VERSION ?= $(notdir $(shell git describe --match "azure-iptables-monitor* " --tags --always) )
@@ -49,7 +49,7 @@ AZURE_IPAM_DIR = $(REPO_ROOT)/azure-ipam
4949AZURE_IP_MASQ_MERGER_DIR = $(REPO_ROOT ) /azure-ip-masq-merger
5050AZURE_IPTABLES_MONITOR_DIR = $(REPO_ROOT ) /azure-iptables-monitor
5151IPV6_HP_BPF_DIR = $(REPO_ROOT ) /bpf-prog/ipv6-hp-bpf
52- BLOCK_IPTABLES_DIR = $(REPO_ROOT ) /bpf-prog/block-iptables
52+ AZURE_BLOCK_IPTABLES_DIR = $(REPO_ROOT ) /bpf-prog/azure- block-iptables
5353
5454CNI_NET_DIR = $(REPO_ROOT ) /cni/network/plugin
5555CNI_IPAM_DIR = $(REPO_ROOT ) /cni/ipam/plugin
@@ -65,7 +65,7 @@ AZURE_IPAM_BUILD_DIR = $(BUILD_DIR)/azure-ipam
6565AZURE_IP_MASQ_MERGER_BUILD_DIR = $(BUILD_DIR ) /azure-ip-masq-merger
6666AZURE_IPTABLES_MONITOR_BUILD_DIR = $(BUILD_DIR ) /azure-iptables-monitor
6767IPV6_HP_BPF_BUILD_DIR = $(BUILD_DIR ) /bpf-prog/ipv6-hp-bpf
68- BLOCK_IPTABLES_BUILD_DIR = $(BUILD_DIR ) /bpf-prog/block-iptables
68+ AZURE_BLOCK_IPTABLES_BUILD_DIR = $(BUILD_DIR ) /bpf-prog/azure- block-iptables
6969IMAGE_DIR = $(OUTPUT_DIR ) /images
7070
7171CNI_BUILD_DIR = $(BUILD_DIR ) /cni
@@ -115,7 +115,7 @@ AZURE_IPAM_ARCHIVE_NAME = azure-ipam-$(GOOS)-$(GOARCH)-$(AZURE_IPAM_VERSION).$(A
115115AZURE_IP_MASQ_MERGER_ARCHIVE_NAME = azure-ip-masq-merger-$(GOOS ) -$(GOARCH ) -$(AZURE_IP_MASQ_MERGER_VERSION ) .$(ARCHIVE_EXT )
116116AZURE_IPTABLES_MONITOR_ARCHIVE_NAME = azure-iptables-monitor-$(GOOS ) -$(GOARCH ) -$(AZURE_IPTABLES_MONITOR_VERSION ) .$(ARCHIVE_EXT )
117117IPV6_HP_BPF_ARCHIVE_NAME = ipv6-hp-bpf-$(GOOS ) -$(GOARCH ) -$(IPV6_HP_BPF_VERSION ) .$(ARCHIVE_EXT )
118- BLOCK_IPTABLES_ARCHIVE_NAME = block-iptables-$(GOOS ) -$(GOARCH ) -$(BLOCK_IPTABLES_VERSION ) .$(ARCHIVE_EXT )
118+ AZURE_BLOCK_IPTABLES_ARCHIVE_NAME = azure- block-iptables-$(GOOS ) -$(GOARCH ) -$(AZURE_BLOCK_IPTABLES_VERSION ) .$(ARCHIVE_EXT )
119119
120120# Image info file names.
121121CNI_IMAGE_INFO_FILE = azure-cni-$(CNI_VERSION ) .txt
@@ -132,7 +132,7 @@ all-binaries-platforms: ## Make all platform binaries
132132
133133# OS specific binaries/images
134134ifeq ($(GOOS ) ,linux)
135- all-binaries : acncli azure-cni-plugin azure-cns azure-npm azure-ipam azure-ip-masq-merger azure-iptables-monitor ipv6-hp-bpf block-iptables
135+ all-binaries : acncli azure-cni-plugin azure-cns azure-npm azure-ipam azure-ip-masq-merger azure-iptables-monitor ipv6-hp-bpf azure- block-iptables
136136all-images : npm-image cns-image cni-manager-image azure-ip-masq-merger-image azure-iptables-monitor-image ipv6-hp-bpf-image
137137else
138138all-binaries : azure-cni-plugin azure-cns azure-npm
@@ -147,7 +147,7 @@ acncli: acncli-binary acncli-archive
147147azure-npm : azure-npm-binary npm-archive
148148azure-ipam : azure-ipam-binary azure-ipam-archive
149149ipv6-hp-bpf : ipv6-hp-bpf-binary ipv6-hp-bpf-archive
150- block-iptables : block-iptables-binary block-iptables-archive
150+ azure- block-iptables : azure- block-iptables-binary azure- block-iptables-archive
151151azure-ip-masq-merger : azure-ip-masq-merger-binary azure-ip-masq-merger-archive
152152azure-iptables-monitor : azure-iptables-monitor-binary azure-iptables-monitor-archive
153153
@@ -174,8 +174,8 @@ azure-iptables-monitor-version: ## prints the azure-iptables-monitor version
174174ipv6-hp-bpf-version : # # prints the ipv6-hp-bpf version
175175 @echo $(IPV6_HP_BPF_VERSION )
176176
177- block-iptables-version : # # prints the block-iptables version
178- @echo $(BLOCK_IPTABLES_VERSION )
177+ azure- block-iptables-version : # # prints the azure- block-iptables version
178+ @echo $(AZURE_BLOCK_IPTABLES_VERSION )
179179
180180cni-version : # # prints the cni version
181181 @echo $(CNI_VERSION )
@@ -210,10 +210,10 @@ else ifeq ($(GOARCH),arm64)
210210 for dir in /usr/include/aarch64-linux-gnu/*; do sudo ln -sfn "$$dir" /usr/include/$$(basename "$$dir"); done
211211endif
212212
213- # Build the block-iptables binary.
214- block-iptables-binary :
215- cd $(BLOCK_IPTABLES_DIR ) && CGO_ENABLED=0 go generate ./...
216- cd $(BLOCK_IPTABLES_DIR ) /cmd/block-iptables && CGO_ENABLED=0 go build -v -o $(BLOCK_IPTABLES_BUILD_DIR ) / block-iptables$(EXE_EXT ) -ldflags " -X main.version=$( BLOCK_IPTABLES_VERSION ) " -gcflags=" -dwarflocationlists=true"
213+ # Build the azure- block-iptables binary.
214+ azure- block-iptables-binary :
215+ cd $(AZURE_BLOCK_IPTABLES_DIR ) && CGO_ENABLED=0 go generate ./...
216+ cd $(AZURE_BLOCK_IPTABLES_DIR ) /cmd/azure- block-iptables && CGO_ENABLED=0 go build -v -o $(AZURE_BLOCK_IPTABLES_BUILD_DIR ) /azure- block-iptables$(EXE_EXT ) -ldflags " -X main.version=$( AZURE_BLOCK_IPTABLES_VERSION ) " -gcflags=" -dwarflocationlists=true"
217217
218218# Build the Azure CNI network binary.
219219azure-vnet-binary :
@@ -861,12 +861,12 @@ ifeq ($(GOOS),linux)
861861 cd $(IPV6_HP_BPF_BUILD_DIR) && $(ARCHIVE_CMD) $(IPV6_HP_BPF_ARCHIVE_NAME) ipv6-hp-bpf$(EXE_EXT)
862862endif
863863
864- # Create a block-iptables archive for the target platform.
865- .PHONY : block-iptables-archive
866- block-iptables-archive : block-iptables-binary
864+ # Create a azure- block-iptables archive for the target platform.
865+ .PHONY : azure- block-iptables-archive
866+ azure- block-iptables-archive : azure- block-iptables-binary
867867ifeq ($(GOOS ) ,linux)
868- $(MKDIR) $(BLOCK_IPTABLES_BUILD_DIR )
869- cd $(BLOCK_IPTABLES_BUILD_DIR ) && $(ARCHIVE_CMD) $(BLOCK_IPTABLES_ARCHIVE_NAME) block-iptables$(EXE_EXT)
868+ $(MKDIR) $(AZURE_BLOCK_IPTABLES_BUILD_DIR )
869+ cd $(AZURE_BLOCK_IPTABLES_BUILD_DIR ) && $(ARCHIVE_CMD) $(AZURE_BLOCK_IPTABLES_ARCHIVE_NAME) azure- block-iptables$(EXE_EXT)
870870endif
871871
872872# #@ Utils
0 commit comments