From 7f6adbe16275fe3a5dd612ccee92fd0a9b952480 Mon Sep 17 00:00:00 2001 From: Ricky Liou Date: Sun, 4 Nov 2018 11:45:00 -0800 Subject: [PATCH] Add launcher commands to Makefile --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 87b1b4d..cfac2e6 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,11 @@ all: @echo @echo 'E.g. "make install TARGETS='autorandr pmutils' PM_UTILS_DIR=/etc/pm/sleep.d".' @echo + @echo "An additional TARGETS variable \"launcher\" is available. This" + @echo "installs a launcher called \"autorandr_launcher\". The launcher" + @echo "is able to be run by the user and calls autorandr automatically" + @echo "without using udev rules." + @echo @echo "The following additional targets are available:" @echo @echo " make deb creates a Debian package" @@ -121,6 +126,12 @@ uninstall_udev: $(if $(UDEV_RULES_DIR),,$(error UDEV_RULES_DIR is not defined)) rm -f ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules +install_launcher: + gcc -Wall contrib/autorandr_launcher/autorandr_launcher.c -o contrib/autorandr_launcher/autorandr_launcher -lxcb -lxcb-randr + install -D -m 755 contrib/autorandr_launcher/autorandr_launcher ${DESTDIR}${PREFIX}/bin/autorandr_launcher + +uninstall_launcher: + rm -f ${DESTDIR}${PREFIX}/bin/autorandr_launcher TARGETS=$(DEFAULT_TARGETS) install: $(patsubst %,install_%,$(TARGETS)) -- 2.39.2