Add _XOPEN_SOURCE to include the right headers
Add the useful UNUSED() macro to dbg.h
Add the magic number to the dependency record.

The magic number will be used later to determine if a target has already
been rebuild.
Implement (incomplete) dependency checking.

Targets still do not depend on .do-files, and a lot of the edge cases
are still not handled correctly. Furthermore some error-checking code is
still missing, which could possibly crash the program (partially marked
with comments), as well as some free() calls.

An utitlity python script (print_dep.py) was also added to aid in
debugging matters.