Split program into a library and an exectuable.