+APP_SOURCES=$(foreach obj, $(APP_OBJECTS:.o=.cpp),$(SRC_DIR)/$(obj))
+
+##All objects depend on all headers. simple but works
+#*.o: $(SRC_DIR)/*.hh
+
+%.dep : $(SRC_DIR)/%.cpp
+ @ echo Building dependencies for $<.
+ @$(SHELL) -c "g++ -M $<" | awk 'BEGIN {N=0}{if(N==0)printf("%s %s\n","$@",$$0);else printf("%s\n", $$0);N+=1;}' > $@
+