1Selectively build groups of tools (inputattach, 2joystick tools and/or force-feedback tools). 3 4Signed-off-by: Koen Martens <gmc@sonologic.nl> 5 6diff -Naur a/utils/Makefile b/utils/Makefile 7--- a/utils/Makefile 2016-04-19 23:28:36.000000000 +0200 8+++ b/utils/Makefile 2017-06-19 08:54:20.152184000 +0200 9@@ -27,8 +27,26 @@ 10 11 CFLAGS ?= -g -O2 -Wall 12 13-PROGRAMS = inputattach jstest jscal fftest ffmvforce ffset \ 14- ffcfstress jscal-restore jscal-store evdev-joystick 15+PROGRAMS = 16+ 17+ifdef ENABLE_INPUTATTACH 18+PROGRAMS += inputattach 19+endif 20+ 21+ifdef ENABLE_JOYSTICK 22+PROGRAMS += jstest 23+PROGRAMS += jscal 24+PROGRAMS += jscal-restore 25+PROGRAMS += jscal-store 26+PROGRAMS += evdev-joystick 27+endif 28+ 29+ifdef ENABLE_FORCEFEEDBACK 30+PROGRAMS += fftest 31+PROGRAMS += ffmvforce 32+PROGRAMS += ffset 33+PROGRAMS += ffcfstress 34+endif 35 36 PREFIX ?= /usr/local 37 38@@ -79,13 +97,20 @@ 39 80-stelladaptor-joystick.rules: 80-stelladaptor-joystick.rules.in 40 sed "s^@@PREFIX@@^$(PREFIX)^g" < $^ > $@ 41 42+INSTALL_DEP = compile 43+ifdef ENABLE_JOYSTICK 44+INSTALL_DEP += 80-stelladaptor-joystick.rules 45+endif 46+ 47 install: compile 80-stelladaptor-joystick.rules 48 install -d $(DESTDIR)$(PREFIX)/bin 49 install $(PROGRAMS) $(DESTDIR)$(PREFIX)/bin 50+ifdef ENABLE_JOYSTICK 51 install -d $(DESTDIR)$(PREFIX)/share/joystick 52 install extract filter ident $(DESTDIR)$(PREFIX)/share/joystick 53 install -d $(DESTDIR)/lib/udev/rules.d 54 install js-set-enum-leds $(DESTDIR)/lib/udev 55 install -m 644 80-stelladaptor-joystick.rules $(DESTDIR)/lib/udev/rules.d 56+endif 57 58 .PHONY: compile clean distclean install 59