fix makefile & code for clang.