Makefile.asm-generic 681 B

12345678910111213141516171819202122232425
  1. # include/asm-generic contains a lot of files that are used
  2. # verbatim by several architectures.
  3. #
  4. # This Makefile reads the file arch/$(SRCARCH)/include/asm/Kbuild
  5. # and for each file listed in this file with generic-y creates
  6. # a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm)
  7. kbuild-file := $(srctree)/arch/$(SRCARCH)/include/asm/Kbuild
  8. -include $(kbuild-file)
  9. include scripts/Kbuild.include
  10. # Create output directory if not already present
  11. _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
  12. quiet_cmd_wrap = WRAP $@
  13. cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@
  14. all: $(patsubst %, $(obj)/%, $(generic-y))
  15. @:
  16. $(obj)/%.h:
  17. $(call cmd,wrap)