added cflag to exit RIOT after last thread automatically