kbuild: refactor headers_* targets in Makefile