separate the minimum runtime from auxiliary functions. Change makefile to allow building static libraries.