[General][Build] Check dependency of headers.
[Build][General] Separate common rules to rules.mak .