WIP FPC-III support
[linux/fpc-iii.git] / arch / s390 / kernel / syscalls / Makefile
blobb98f25029b8e60adb08aae0ee8d51bee52c6f5d6
1 # SPDX-License-Identifier: GPL-2.0
3 gen := arch/$(ARCH)/include/generated
4 kapi := $(gen)/asm
5 uapi := $(gen)/uapi/asm
7 syscall := $(srctree)/$(src)/syscall.tbl
8 systbl := $(srctree)/$(src)/syscalltbl
10 gen-y := $(kapi)/syscall_table.h
11 kapi-hdrs-y := $(kapi)/unistd_nr.h
12 uapi-hdrs-y := $(uapi)/unistd_32.h
13 uapi-hdrs-y += $(uapi)/unistd_64.h
15 targets += $(addprefix ../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
17 PHONY += kapi uapi
19 kapi: $(gen-y) $(kapi-hdrs-y)
20 uapi: $(uapi-hdrs-y)
23 # Create output directory if not already present
24 _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
25 $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
27 filechk_syshdr = $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$2" < $<
29 filechk_sysnr = $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) < $<
31 filechk_syscalls = $(CONFIG_SHELL) '$(systbl)' -S < $<
33 syshdr_abi_unistd_32 := common,32
34 $(uapi)/unistd_32.h: $(syscall) FORCE
35 $(call filechk,syshdr,$@)
37 syshdr_abi_unistd_64 := common,64
38 $(uapi)/unistd_64.h: $(syscall) FORCE
39 $(call filechk,syshdr,$@)
41 $(kapi)/syscall_table.h: $(syscall) FORCE
42 $(call filechk,syscalls)
44 sysnr_abi_unistd_nr := common,32,64
45 $(kapi)/unistd_nr.h: $(syscall) FORCE
46 $(call filechk,sysnr)