(Makefile) Cleanup and CXX warning fixes
Fix C++ build linkage
Merge pull request #1021 from heuripedes/master

C++ build fixes