fix smc.h header for usage in C++
make some functions static
switch default compiler to clang
build an *.a library by default
code style cleanup