From f6690f23148f7bf1445dc6435742fccff0cb1b3e Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 16 May 2020 05:55:13 -0400 Subject: initial commit --- Makefile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3c1379f --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +# GNU Makefile for jsmond +PROJ=jsmond + +# the .rst is the authoritative source for the version number. +VERSION=$(shell fgrep '.. |version| replace::' $(PROJ).rst | cut -d' ' -f4) + +# maximum number of devices we can monitor. 16 seems like an awful lot... +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" + +# Override this, not CFLAGS +OPTFLAGS=-Wall -ansi -pedantic -std=c89 -g + +# 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 + +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 + + +CFLAGS=$(OPTFLAGS) $(DEFINES) + +all: jsmond + +man: jsmond.rst + rst2man.py jsmond.rst > jsmond.1 + +clean: + rm -f $(PROJ) + +.PHONY: all man clean -- cgit v1.2.3