fully working build system. Just getting it working, not pretty.

Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>