Refactor Makefile

Why do manual dependency checking when you can have the computer do it for
you?

Okay, it's a bit annoying to initally set up, especially if you want to
build in a separate directory, but it can be done (at least with GNU Make).