Fix building order. BUILD_ENERGY_MIN constant