https://github.com/cilium/cilium
Revision 506068f8ddfc664a33c754aba63fbb0cf0eeb28e authored by John Fastabend on 24 January 2019, 20:41:24 UTC, committed by Thomas Graf on 30 January 2019, 16:53:25 UTC
[ upstream commit 2cddea1bbfb54aa234a09d36fb930ebfc7c184b0 ]

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Joe Stringer <joe@cilium.io>
1 parent c127e67
Raw File
Tip revision: 506068f8ddfc664a33c754aba63fbb0cf0eeb28e authored by John Fastabend on 24 January 2019, 20:41:24 UTC
cilium: ipsec, ipv6 recv support
Tip revision: 506068f
Makefile.defs
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
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)"

# Set DOCKER_IMAGE_TAG with "latest" by default
ifeq ($(DOCKER_IMAGE_TAG),)
    DOCKER_IMAGE_TAG="latest"
endif

GOBUILD = -ldflags '$(GOLDFLAGS)'

# Uncomment to enable race detection
#GOBUILD += -race

# Uncomment to enable deadlock detection
#GOBUILD += -tags lockdebug

ifneq ($(LOCKDEBUG),)
    GOBUILD += -tags lockdebug
endif
back to top