forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.defs
32 lines (26 loc) · 836 Bytes
/
Makefile.defs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PREFIX?=/usr
BINDIR?=$(PREFIX)/bin
RUNDIR?=/var/run
CONFDIR?=/etc
GO = go
INSTALL = install
VERSION = $(shell cat $(dir $(lastword $(MAKEFILE_LIST)))/VERSION)
# 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 $(dir $(lastword $(MAKEFILE_LIST)))/GIT_VERSION)
endif
BUILD = $(VERSION) $(GIT_VERSION) $(shell go version)
GOBUILD = -ldflags '-X "github.com/cilium/cilium/pkg/version.Version=$(BUILD)"'
# Uncomment to enable race detection
#GOBUILD += -race
# Uncomment to enable deadlock detection
#GOBUILD += -tags lockdebug
ifneq ($(LOCKDEBUG),)
GOBUILD += -tags lockdebug
endif
# Set DOCKER_IMAGE_TAG with "latest" by default
ifeq ($(DOCKER_IMAGE_TAG),)
DOCKER_IMAGE_TAG="latest"
endif