Add --codegen option to support separate compilation