add rule; move rules into rules.h; remove config.def.h