Revision 9b49d9eeaf82c9de3f904f245c6986b3c0148b2a authored by Rajat Jindal on 19 August 2019, 11:46:09 UTC, committed by Martynas Pumputis on 23 August 2019, 10:19:12 UTC
[ upstream commit 5e52b9651761ed09b910476c57405627ec8f541f ] [ upstream commit: none ] Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com> Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
1 parent 44ff79f
Makefile.defs
SHELL := /bin/bash
.SHELLFLAGS := -eu -o pipefail -c
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
RELATIVE_DIR := $(shell echo $(realpath .) | sed "s;$(ROOT_DIR)[/]*;;")
include $(ROOT_DIR)/Makefile.quiet
PREFIX?=/usr
BINDIR?=$(PREFIX)/bin
CNIBINDIR?=/opt/cni/bin
CNICONFDIR?=/etc/cni/net.d
LIBDIR?=$(PREFIX)/lib
RUNDIR?=/var/run
CONFDIR?=/etc
ifeq ($(GO),)
GO = go
endif
INSTALL = $(QUIET)install
VERSION = $(shell cat $(dir $(lastword $(MAKEFILE_LIST)))/VERSION)
VERSION_MAJOR = $(shell cat $(dir $(lastword $(MAKEFILE_LIST)))/VERSION | cut -d. -f1)
# Use git only if in a Git repo
ifneq ($(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/.git),)
GIT_VERSION = $(shell git show -s --format='format:%h %aI')
else
GIT_VERSION = $(shell cat $(ROOT_DIR)/GIT_VERSION)
endif
BUILD = $(VERSION) $(GIT_VERSION) $(shell go version)
GOLDFLAGS = -X "github.com/cilium/cilium/pkg/version.Version=$(BUILD)"
CILIUM_ENVOY_SHA=$(shell grep -o "FROM.*cilium/cilium-envoy:[0-9a-fA-F]*" $(ROOT_DIR)/Dockerfile | cut -d : -f 2)
GOLDFLAGS += -X "github.com/cilium/cilium/pkg/envoy.RequiredEnvoyVersionSHA=$(CILIUM_ENVOY_SHA)"
GOLDFLAGS += -X "github.com/cilium/cilium/pkg/datapath/loader.DatapathSHA=$(GO_BINDATA_SHA1SUM)"
# Set DOCKER_IMAGE_TAG with "latest" by default
ifeq ($(DOCKER_IMAGE_TAG),)
DOCKER_IMAGE_TAG="latest"
endif
GOBUILD = -ldflags '$(GOLDFLAGS)' $(EXTRA_GOBUILD_FLAGS)
# Uncomment to enable race detection
#GOBUILD += -race
# Uncomment to enable deadlock detection
#GOBUILD += -tags lockdebug
ifneq ($(LOCKDEBUG),)
GOBUILD += -tags lockdebug
endif
# Container engine
CONTAINER_ENGINE?=docker
CONTAINER_ENGINE_FULL=$(QUIET)$(CONTAINER_ENGINE)
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...