Add test and profile to c and cxx flags.