implements --endpoint option
improve emit definition header