dunst/config.mk
Nikos Tsipinakis 943b8c6785 Do not expand config.mk variables on assignment
Fix a bug introduced in 678ea70 where since the CFLAGS variable was
simply expanded it ignored the VERSION variable which was initialized
later.

Unfortunately there is no way to prepend a value to a recursively
expanded variable so instead we have to split the hardcoded compiler
flags into separate variables and combine them all later in the
makefile.

Fixes #500
2018-03-11 17:05:10 +02:00

45 lines
1.2 KiB
Makefile

# paths
PREFIX ?= /usr/local
MANPREFIX = ${PREFIX}/share/man
PKG_CONFIG ?= pkg-config
# Disable systemd service file installation,
# if you don't want to use systemd albeit installed
#SYSTEMD ?= 0
# uncomment to disable parsing of dunstrc
# or use "CFLAGS=-DSTATIC_CONFIG make" to build
#STATIC= -DSTATIC_CONFIG # Warning: This is deprecated behavior
# flags
DEFAULT_CPPFLAGS = -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\"
DEFAULT_CFLAGS = -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os ${STATIC}
DEFAULT_LDFLAGS = -lm
CPPFLAGS_DEBUG := -DDEBUG_BUILD
CFLAGS_DEBUG := -O0
LDFLAGS_DEBUG :=
pkg_config_packs := dbus-1 \
gio-2.0 \
gdk-pixbuf-2.0 \
"glib-2.0 >= 2.36" \
pangocairo \
x11 \
xinerama \
"xrandr >= 1.5" \
xscrnsaver
# check if we need libxdg-basedir
ifeq (,$(findstring STATIC_CONFIG,$(CFLAGS)))
pkg_config_packs += libxdg-basedir
else
$(warning STATIC_CONFIG is deprecated behavior. It will get removed in future releases)
endif
# dunstify also needs libnotify
ifneq (,$(findstring dunstify,${MAKECMDGOALS}))
pkg_config_packs += libnotify
endif