Kbuild 737 Bytes
Newer Older
1
# SPDX-License-Identifier: GPL-2.0
2 3 4
#
# Kbuild for top-level directory of U-Boot

5
#####
6
# Generate generic-asm-offsets.h
7 8 9 10

generic-offsets-file := include/generated/generic-asm-offsets.h

always  := $(generic-offsets-file)
11
targets := lib/asm-offsets.s
12

13
$(obj)/$(generic-offsets-file): $(obj)/lib/asm-offsets.s FORCE
14
	$(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__)
15 16

#####
17
# Generate asm-offsets.h
18

19
ifneq ($(wildcard $(srctree)/arch/$(ARCH)/lib/asm-offsets.c),)
20 21 22 23
offsets-file := include/generated/asm-offsets.h
endif

always  += $(offsets-file)
24
targets += arch/$(ARCH)/lib/asm-offsets.s
25 26 27

CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY

28
$(obj)/$(offsets-file): $(obj)/arch/$(ARCH)/lib/asm-offsets.s FORCE
29
	$(call filechk,offsets,__ASM_OFFSETS_H__)