obtain lk's build system

LK's build system is really extendable. Get the project directory of lk
and split startup code, platform dependent code into seperate
directories.