Changed generator script to allow build flags to be specified