fix constant and enum generation
tweak build flags