if [ -e "$1.cpp" ]
then
  CC=g++
  EXT=.cpp
else
  CC=gcc
  EXT=.c
fi

$CC -MD -MF $1.d -c -o $3 $1$EXT -ggdb3 -Wall -Werror -Wno-write-strings -Ilibs/physicsfs-2.0.2 -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/usr/local/include/SDL -I/usr/local/Cellar/libvorbis/1.3.2/include -I/usr/local/Cellar/libogg/1.2.2/include   -DGLEW_STATIC -Ilibs/glew-1.6.0/ -FOpenGL -Ilibs/soil
EXIT=$?

read DEPS < $1.d
redo-ifchange ${DEPS#*:}

exit $EXIT
