Make the build setup compile the whole application

The build setup compiles every source file until it hits the main source
file. It will not have compiled anything farther down in the folder
listing, which is very bad. Fix it by compiling the main executable
after everything else has been compiled.