split compiler and linker flgas properly
add scanf() error checking and fix logic
Merge pull request #15 from merces/master

Makefile improvements and warning fix