Fix Makefile issues and Clang warnings