aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Antoine Damhet <antoine.damhet@lse.epita.fr>2019-09-10 00:24:05 +0200
committerGravatar Hummer12007 <hilobakho@gmail.com>2019-09-19 13:21:27 +0300
commit99c21787cbbbde7ca1eb57abc8e7e3b3101eeb6d (patch)
tree5cd1900315b581201d47a8dca6aaee19a88b4785 /Makefile
parent4500f760d4f847bc29d4b85e77d6d7c2a228f9d4 (diff)
Support the new `SetBrightness` logind API
This API from `org.freedesktop.login1.Session` allows an unprivileged user with an active session to change its own backlight. Systemd >= v243 is needed. Signed-off-by: Antoine Damhet <antoine.damhet@lse.epita.fr>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f324efd..22ff475 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,12 @@ INSTALL_UDEV_RULES = 1
INSTALL_UDEV_1 = install_udev_rules
UDEVDIR ?= /lib/udev/rules.d
+ifdef ENABLE_SYSTEMD
+ CFLAGS += ${shell pkg-config --cflags libsystemd}
+ LDLIBS += ${shell pkg-config --libs libsystemd}
+ CPPFLAGS += -DENABLE_SYSTEMD
+endif
+
MODE_0 = 4711
MODE_1 = 0755
MODE = ${MODE_${INSTALL_UDEV_RULES}}