+single : REALTYPE = 0
+single : $(BIN)
+
+double : REALTYPE = 1
+double : $(BIN)
+
+
+
+CFLAGS := $(CFLAGS) $(QT_DEF)
+
+demo : $(BIN) ../tools/stream_plot.py
+ mkdir -p ../data/
+ $(RM) ../data/performance.dat
+ ./ipdf | tee ../data/performance.dat | ../tools/stream_plot.py 2>/dev/null
+
+movie : $(BIN) ../tools/stream_plot.py
+ mkdir -p ../data/
+ $(RM) ../data/performance.dat
+ $(RM) ../data/movie.ogv
+ ./ipdf | tee ../data/performance.dat | ../tools/stream_plot.py 2>/dev/null & recordmydesktop --fps 10 --on-the-fly-encoding -o ../data/movie.ogv
+
+# The tests will compile with the default REALTYPE definition
+# To change that you can run as `make DEFS="REALTYPE=X" tests/<target>` where X is your chosen type
+# But remember to make clean first.
+tests/% : tests/%.cpp ../obj/tests/%.o $(LINKOBJ)
+
+-include $(DEPS)
+
+runtests : tests/runtests.sh
+ cd tests; ./runtests.sh
+
+
+$(BIN) : $(LINKOBJ) ../obj/$(MAIN)
+ echo $(LINKOBJ)
+ @mkdir -p $(dir $@)
+ $(CXX) $(CFLAGS) -o $(BIN) $(LINKOBJ) ../obj/$(MAIN) $(LIB) $(MAINRPATH)
+
+-include $(DEPS)
+
+moc_controlpanel.cpp : controlpanel.cpp controlpanel.h
+ moc-qt4 $(DEF) controlpanel.h -o moc_controlpanel.cpp
+
+../obj/%.o : %.cpp main.h