Factorize Debug and Release rules