Makefile 875 B

123456789101112131415161718192021222324252627282930313233343536
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # Makefile for s390 specific build tools
  4. #
  5. kapi := arch/$(ARCH)/include/generated/asm
  6. kapi-hdrs-y := $(kapi)/facility-defs.h $(kapi)/dis-defs.h
  7. targets += $(addprefix ../../../,$(kapi-hdrs-y))
  8. PHONY += kapi
  9. kapi: $(kapi-hdrs-y)
  10. hostprogs-y += gen_facilities
  11. hostprogs-y += gen_opcode_table
  12. HOSTCFLAGS_gen_facilities.o += -Wall $(LINUXINCLUDE)
  13. HOSTCFLAGS_gen_opcode_table.o += -Wall $(LINUXINCLUDE)
  14. # Ensure output directory exists
  15. _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
  16. define filechk_facility-defs.h
  17. $(obj)/gen_facilities
  18. endef
  19. define filechk_dis-defs.h
  20. ( $(obj)/gen_opcode_table < $(srctree)/arch/$(ARCH)/tools/opcodes.txt )
  21. endef
  22. $(kapi)/facility-defs.h: $(obj)/gen_facilities FORCE
  23. $(call filechk,facility-defs.h)
  24. $(kapi)/dis-defs.h: $(obj)/gen_opcode_table FORCE
  25. $(call filechk,dis-defs.h)