add a main function callable from extern
add a main function callable from extern


Former-commit-id: 46096dd359615310c13b7e310850b2efe889c6f1
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine