Chiral effective theory for heavy mesons