+
+tags: ${SRCS}
+ ${Q1}echo "ctags: $@"
+ ${Q2}ctags $^
+
+
+.PHONY: clean
+clean:
+ ${Q1}echo "CLEAN: OBJS"
+ ${Q2}rm -f ${OBJS}
+ ${Q1}echo "CLEAN: TARGET"
+ ${Q2}rm -f ${TARGET}
+
+.PHONY: distclean
+distclean: clean
+ ${Q1}echo "CLEAN: DEPS"
+ ${Q2}rm -f ${DEPS}
+ ${Q1}echo "CLEAN: tags prof gmon.out"
+ ${Q2}rm -f tags prof gmon.out
+
+.PHONY: gitclean
+gitclean:
+ ${Q1}echo "git-clean: show, use gitcleanf to force"
+ ${Q2}cd ..; git clean -nxd
+
+.PHONY: gitcleanf
+gitcleanf:
+ ${Q1}echo "git-clean: forced"
+ ${Q2}cd ..; git clean -fxd
+
+.PHONY: tar
+tar: ../physics.tar.bz2
+
+.PHONY: ../physics.tar.bz2
+../physics.tar.bz2:
+ @echo "git-archive: Warning, archives HEAD not current"
+ ${Q1}echo "git-archive: ../physics.tar.bz2"
+ ${Q2}cd ..; git-archive --prefix=physics/ HEAD | bzip2 > physics.tar.bz2
+
+.PHONY: run
+run: all
+ cd ${WORKINGDIR}; ./${TARGETNAME}
+
+.PHONY: gdb
+gdb: all
+ cd ${WORKINGDIR}; gdb ${TARGETNAME}
+
+.PHONY: cgdb
+cgdb: all
+ cd ${WORKINGDIR}; cgdb ${TARGETNAME}
+
+.PHONY: val
+val: all
+ cd ${WORKINGDIR}; valgrind ${VALFLAGS} ./${TARGETNAME}
+
+.PHONY: prof
+prof: run
+ cd ${WORKINGDIR}; gprof -b ${TARGETNAME} > src/prof
+ kprof -f prof
+
+MINGMAKEARGS := "LIBGL := -lopengl32 -lglu32" \
+ "LIBSDL := `/usr/mingw32/bin/sdl-config --libs`" \
+ "CXXFLAGS := ${OPTFLAGS}" \
+ "CXX := mingw32-g++" \
+ "OBJSDIR := ../objs-mingw32/" \
+ "WORKINGDIR := ../bin-mingw32/" \
+ "TARGETNAME := run_physics.exe"
+
+.PHONY: mingw32
+mingw32:
+ ${Q1}echo "make: mingw32"
+ ${Q2}${MAKE} ${MINGMAKEARGS} clean all
+
+-include ${DEPS}