2022-05-17 10:14:59 +00:00
|
|
|
|
|
|
|
RM=rm -rf
|
|
|
|
CP=cp
|
|
|
|
CPR=cp -r
|
|
|
|
MKDIR=mkdir -p
|
|
|
|
|
2022-07-18 10:54:03 +00:00
|
|
|
# Go should not be required to run functional tests
|
2022-12-02 12:04:00 +00:00
|
|
|
GOOS ?= $(shell go env GOOS)
|
2022-05-17 10:14:59 +00:00
|
|
|
|
2023-06-29 14:35:19 +00:00
|
|
|
# Current versioning information from env
|
2024-01-15 10:05:27 +00:00
|
|
|
# The $(or) is used to ignore an empty BUILD_VERSION when it's an envvar,
|
|
|
|
# like inside a docker build: docker build --build-arg BUILD_VERSION=1.2.3
|
|
|
|
# as opposed to a make parameter: make BUILD_VERSION=1.2.3
|
|
|
|
BUILD_VERSION:=$(or $(BUILD_VERSION),$(shell git describe --tags --dirty))
|
|
|
|
|
2022-05-17 10:14:59 +00:00
|
|
|
BUILD_TIMESTAMP=$(shell date +%F"_"%T)
|
|
|
|
DEFAULT_CONFIGDIR?=/etc/crowdsec
|
2022-07-18 10:54:03 +00:00
|
|
|
DEFAULT_DATADIR?=/var/lib/crowdsec/data
|
2023-06-29 14:35:19 +00:00
|
|
|
|
|
|
|
PKG_CONFIG:=$(shell command -v pkg-config 2>/dev/null)
|
|
|
|
|
|
|
|
# See if we have libre2-dev installed for C++ optimizations.
|
|
|
|
# In fedora and other distros, we need to tell where to find re2.pc
|
|
|
|
RE2_CHECK := $(shell PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$(PKG_CONFIG_PATH) pkg-config --libs re2 2>/dev/null)
|