+ARCH := $(shell uname -m)
+# TODO: stb_truetype doesn't compile with some of these warnings.
+
+# This seemed like a good idea 2 hours ago ok...
+ifeq ($(ARCH), win32)
+ CXX = i686-w64-mingw32-g++ -std=c++11 -g -Wall -Werror -Wshadow -pedantic
+else
+ CXX = g++ -std=c++11 -g -Wall -Werror -Wshadow -pedantic -rdynamic
+endif
+
+MAIN = main.o
+OBJ = log.o profiler.o real.o bezier.o objectrenderer.o view.o screen.o graphicsbuffer.o framebuffer.o shaderprogram.o stb_truetype.o gl_core44.o path.o document.o debugscript.o paranoidnumber.o
+
+QT_INCLUDE := -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Itests -I.
+QT_DEF := -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
+QT_LIB := -L/usr/lib/x86_64-linux-gnu -lQtGui -lQtCore -lpthread
+
+LIB_x86_64 = ../contrib/lib/libSDL2-2.0.so.0 -lGL -lgmp -lmpfr
+LIB_i386 = ../contrib/lib32/libSDL2-2.0.so.0 -lGL -lgmp -lmpfr
+LIB_i686 = $(LIB_i386)
+LIB_win32 = -mwindows -lmingw32 -L../contrib/win32/lib/ -lSDL2main -lSDL2 -lgmp -static-libgcc -lopengl32 -static-libstdc++ -lmpfr
+
+MAINRPATH_x86_64 = -Wl,-rpath,'$$ORIGIN/../contrib/lib'
+MAINRPATH_i386 = -Wl,-rpath,'$$ORIGIN/../contrib/lib32'
+MAINRPATH_i686 = $(MAINRPATH_i386)
+MAINRPATH_win32 = -Wl,-rpath,'$$ORIGIN/../contrib/win32/lib'
+TESTRPATH_x86_64 = -Wl,-rpath,'$$ORIGIN/../../contrib/lib'
+TESTRPATH_i386 = -Wl,-rpath,'$$ORIGIN/../../contrib/lib32'
+TESTRPATH_i686 = $(TESTRPATH_i386)
+TESTRPATH_win32 = -Wl,-rpath,'$$ORIGIN/../../contrib/win32/lib'