diff -Naur xwiimote-0b79d97/lib/Makefile xwiimote-0b79d97.patch/lib/Makefile
--- xwiimote-0b79d97/lib/Makefile	2011-10-07 01:24:24.000000000 +0200
+++ xwiimote-0b79d97.patch/lib/Makefile	2011-10-07 01:32:17.403217723 +0200
@@ -4,13 +4,15 @@
 # Dedicated to the Public Domain
 #
 
+CC ?= gcc
+
 SFSPATH=../../misc/libmisc/libsfs
 
 all: libxwiimote.so
 
 # build xwiimote library
 libxwiimote.so: event.c udev.c sfs.c xwiimote.h libsfs.h
-	gcc -o $@ $^ -ludev -Wall -shared -fPIC
+	$(CC) -o $@ $^ -ludev -Wall -shared -fPIC
 
 #
 # The copy rule is only used by maintainers to copy the most recent version of
diff -Naur xwiimote-0b79d97/tools/Makefile xwiimote-0b79d97.patch/tools/Makefile
--- xwiimote-0b79d97/tools/Makefile	2011-10-07 01:24:24.000000000 +0200
+++ xwiimote-0b79d97.patch/tools/Makefile	2011-10-07 01:32:53.053681433 +0200
@@ -4,6 +4,8 @@
 # Dedicated to the Public Domain
 #
 
+CC ?= gcc
+
 .PHONY: all clean
 
 all: xwiishow xwiidump
@@ -12,10 +14,10 @@
 	@rm -fv xwiishow xwiidump
 
 xwiishow: xwiishow.c ../lib/libxwiimote.so
-	gcc -o xwiishow xwiishow.c -Wall ../lib/libxwiimote.so -I../lib
+	$(CC) -o xwiishow xwiishow.c -Wall -L../lib/ -lxwiimote -I../lib
 
 xwiidump: xwiidump.c
-	gcc -o xwiidump xwiidump.c -Wall
+	$(CC) -o xwiidump xwiidump.c -Wall
 
 ../lib/libxwiimote.so:
 	@echo Making library
