1# SPDX-License-Identifier: GPL-2.0 2# 3# Kbuild for top-level directory of U-Boot 4 5##### 6# Generate generic-asm-offsets.h 7 8generic-offsets-file := include/generated/generic-asm-offsets.h 9 10always := $(generic-offsets-file) 11targets := lib/asm-offsets.s 12 13CFLAGS_REMOVE_asm-offsets.o := $(LTO_CFLAGS) 14 15$(obj)/$(generic-offsets-file): $(obj)/lib/asm-offsets.s FORCE 16 $(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__) 17 18##### 19# Generate asm-offsets.h 20 21ifneq ($(wildcard $(srctree)/arch/$(ARCH)/lib/asm-offsets.c),) 22offsets-file := include/generated/asm-offsets.h 23endif 24 25always += $(offsets-file) 26targets += arch/$(ARCH)/lib/asm-offsets.s 27 28CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY 29 30$(obj)/$(offsets-file): $(obj)/arch/$(ARCH)/lib/asm-offsets.s FORCE 31 $(call filechk,offsets,__ASM_OFFSETS_H__) 32