diff -Naur a/Makefile b/Makefile
--- a/Makefile	2016-01-22 20:52:21.000000000 +0100
+++ b/Makefile	2016-01-22 21:29:34.601124600 +0100
@@ -1,9 +1,11 @@
-CXX = g++
-CXXFLAGS = -Wall -std=c++11 -O3 -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM
+CXX ?= g++
+CXXFLAGS += -Wall -std=c++11 -O3 -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM
 
-INCLUDES = -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
-LIB_PATHS = -L/opt/vc/lib/
-LIBS = -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lvncserver -lconfig++
+SYSROOT_PREFIX ?=
+
+INCLUDES = -I$(SYSROOT_PREFIX)/usr/include/ -I$(SYSROOT_PREFIX)/usr/include/interface/vcos/pthreads -I$(SYSROOT_PREFIX)/usr/include/interface/vmcs_host/linux
+LIB_PATHS = -L$(SYSROOT_PREFIX)/usr/lib/
+LIBS = -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lconfig++ -lz -lssl -lcrypto -lresolv -lvncserver -ljpeg -lpng16 -lsystemd
 
 SOURCES = main.cpp \
 		UFile.cpp \
