added optimizing and warning flags to makefile. notably, -O2 resulted in an over 4x speedup