From 3cb01a3ce6720aa6620e6c020508679b503fd5a3 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 7 Aug 2015 15:16:15 +0200 Subject: [PATCH] Tune xwiimote handling Make the XWIIMOTE Makefile variable overrideable, and also find the linkable library in $(XWIIMOTE)/.libs --- Makefile | 4 ++-- README.md | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3b5a838..bd38f9b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -XWIIMOTE=../xwiimote/lib +XWIIMOTE ?=../xwiimote wiimote-pad: wiimote-pad.c - $(CC) -Wall -o $@ $< -I$(XWIIMOTE) -ludev -lxwiimote + $(CC) -Wall -o $@ $< -I$(XWIIMOTE)/lib -L$(XWIIMOTE)/.libs -ludev -lxwiimote clean: @rm -rf wiimote-pad diff --git a/README.md b/README.md index b4b7c83..3b301be 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,12 @@ should work. If you compiled and built `libxwiimote` yourself, you might need to fix the include path in the `Makefile` to point to the correct -locations to look for the headers. By default, aside from standard -locations, the `Makefile` will look for an `xwiimote` source directory -in the parent of the `wiimote-pad` directory. +locations to look for the headers, or run + + make XWIIMOTE=/path/to/xwiimote/sources + +instead. By default, aside from standard locations, the `Makefile` will +look for an `xwiimote` source directory in the parent of the +`wiimote-pad` directory. [xwiimote]: http://dvdhrm.github.io/xwiimote -- 2.32.0.93.g670b81a890