Add makefile.
Fix references to local headers.
Also define macro for platform selection.
Add appropriate .gitignore.