updated how to handle CXXFLAGS
Merge branches 'dev' and 'master'