Use pattern rules and header detection to eliminate repetition. Added .gitignore to avoid accidental checkin of binaries and intermediate files.
Merge pull request #11 from baron1405/makefile-tweaks

Avoid repetition in the Makefile and automate header file dependencies