refator to remove cmake

mkmf.rb sucks as well, so roll our own