Codegen control with kmd file and support for multiple local kmd files

Change-Id: If6c5eea461a03e0ca53914a2d4a8a48669892af4