aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 9 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index c80b615..374ffbb 100644
--- a/Makefile
+++ b/Makefile
@@ -7,13 +7,13 @@
MAX_STICKS=16
# base name of joystick devices on your OS, gets numbers 0 to MAX_STICKS
-# appended to it during autodetection
-JSDEVBASE="/dev/input/js"
+# appended to it during autodetection. This is the base filename without
+# the directory. If your first joystick is /dev/input/js0, say js here.
+JSNODE=js
-# If you can think of a reason to compile without X11 support,
-# set this to 0 (or anything other than 1). Note that you can
-# compile with X11 and then disable it at runtime with -x.
-HAVE_X11=1
+# directory where joystick devices live. monitored via inotify(7) to
+# detect hotplug events.
+EVENTDIR=/dev/input
# Intended for optimizations, but you could include other flags here.
# Override this, not CFLAGS
@@ -54,14 +54,10 @@ PROJ=jsmond
# the .rst is the authoritative source for the version number.
VERSION=$(shell fgrep '.. |version| replace::' $(PROJ).rst | cut -d' ' -f4)
-DEFINES=-DVERSION=\"$(VERSION)\" -DMAX_STICKS=$(MAX_STICKS) -DJSDEVBASE=\"$(JSDEVBASE)\"
-
-ifeq ($(HAVE_X11),1)
-CFLAGS+=$(shell pkg-config --cflags x11)
-LDFLAGS+=$(shell pkg-config --libs x11)
-DEFINES+=-DHAVE_X11
-endif
+DEFINES=-DVERSION=\"$(VERSION)\" -DMAX_STICKS=$(MAX_STICKS) -DJSNODE=\"$(JSNODE)\" -DEVENTDIR=\"$(EVENTDIR)\"
+CFLAGS+=$(shell pkg-config --cflags x11 xtst)
+LDFLAGS+=$(shell pkg-config --libs x11 xtst)
CFLAGS=$(OPTFLAGS) $(DEFINES)
LDFLAGS+=$(LDEXTRA)