Fixed makefile flags

CLAGS is used for a c compiler, CXXFLAGS is used with g++.
Now the object files are actually compiled with -O2 and -Wall.