adeded optimization flags to building rules