Fixes to makefile, added explicit optimizations flags