redo-ifchange build/config.sh
. build/config.sh

QUAKE_SOURCE=($(find src -name *.cpp))
SOIL_SOURCE=(libs/soil/*.c)
GLEW_SOURCE=(libs/glew-1.6.0/*.c)
OBJECT_FILES="${QUAKE_SOURCE[*]/%.cpp/.o} ${SOIL_SOURCE[*]/%.c/.o} ${GLEW_SOURCE[*]/%.c/.o}"

PCH_DEPS="src/pch.h.gch"
LIBRARY_DEPS="libs/zlib.stamp libs/physfs.stamp"
DEPS="$OBJECT_FILES $PCH_DEPS $LIBRARY_DEPS"

redo-ifchange $DEPS

g++ -o $3 $LDFLAGS $OBJECT_FILES libs/zlib-1.2.5/libz.a libs/physfs-2.0.2/libphysfs.a

