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