non-stupid compilation method