Prepare support for static linking
Cleanup makefile