From: Ricky Liou Date: Sun, 4 Nov 2018 19:45:00 +0000 (-0800) Subject: Add launcher commands to Makefile X-Git-Tag: 1.8~7^2~4 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=7f6adbe16275fe3a5dd612ccee92fd0a9b952480 Add launcher commands to Makefile --- 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))