XD/config.mk

54 lines
1 KiB
Makefile

VERSION := `git describe --tags --dirty`
PKG_CONFIG = pkg-config
# paths
PREFIX = /usr/local
MANDIR = $(PREFIX)/share/man
GIT =
GITHASH =
GITLIB =
# comment to disable git support
GIT = -DGIT
GITHASH = -DGITHASH
GITLIB = libgit2
ERR =
# uncomment to enable errors
# ERR = -DERR
PERF =
# uncomment to enable performance logging
# PERF = -DPERF
EXPLAIN =
# comment to disable explinations
EXPLAIN = -DEXPLAIN
# add compilation details to VERSION variable
ifneq ($(GIT),)
VERSION := $(VERSION)"\\nlibgit2 "`$(PKG_CONFIG) --modversion $(GITLIB)`
endif
ifeq ($(GITHASH),)
VERSION := $(VERSION)"\\ngit hashing disabled"
else
VERSION := $(VERSION)"\\ngit hashing enabled"
endif
ifeq ($(EXPLAIN),)
VERSION := $(VERSION)"\\nexplinations disabled"
else
VERSION := $(VERSION)"\\nexplinations enabled"
endif
ifeq ($(ERR),)
VERSION := $(VERSION)"\\nerrors disabled"
else
VERSION := $(VERSION)"\\nerrors enabled"
endif
ifeq ($(PERF),)
VERSION := $(VERSION)"\\nperformance logging disabled"
else
VERSION := $(VERSION)"\\nperformance logging enabled"
endif
CC = cc