Work on makefile

I think the makefile is done, but I've no introductions to test it on!
Merging with master to work on it some more.