2020-04-17 15:21:36 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2014-02-24 10:12:11 +08:00
|
|
|
#
|
|
|
|
# Kbuild for top-level directory of U-Boot
|
|
|
|
|
2015-03-27 09:59:01 +08:00
|
|
|
#####
|
2020-04-17 15:21:36 +08:00
|
|
|
# Generate generic-asm-offsets.h
|
2015-03-27 09:59:01 +08:00
|
|
|
|
|
|
|
generic-offsets-file := include/generated/generic-asm-offsets.h
|
|
|
|
|
|
|
|
always := $(generic-offsets-file)
|
2015-07-05 00:56:56 +08:00
|
|
|
targets := lib/asm-offsets.s
|
2015-03-27 09:59:01 +08:00
|
|
|
|
2021-05-20 19:24:03 +08:00
|
|
|
CFLAGS_REMOVE_asm-offsets.o := $(LTO_CFLAGS)
|
|
|
|
|
2020-04-17 15:21:37 +08:00
|
|
|
$(obj)/$(generic-offsets-file): $(obj)/lib/asm-offsets.s FORCE
|
2015-03-27 09:59:03 +08:00
|
|
|
$(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__)
|
2014-02-24 10:12:11 +08:00
|
|
|
|
|
|
|
#####
|
2020-04-17 15:21:36 +08:00
|
|
|
# Generate asm-offsets.h
|
2014-02-24 10:12:11 +08:00
|
|
|
|
2014-03-18 15:38:13 +08:00
|
|
|
ifneq ($(wildcard $(srctree)/arch/$(ARCH)/lib/asm-offsets.c),)
|
2014-02-24 10:12:11 +08:00
|
|
|
offsets-file := include/generated/asm-offsets.h
|
|
|
|
endif
|
|
|
|
|
|
|
|
always += $(offsets-file)
|
2014-03-18 15:38:13 +08:00
|
|
|
targets += arch/$(ARCH)/lib/asm-offsets.s
|
2014-02-24 10:12:11 +08:00
|
|
|
|
|
|
|
CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY
|
|
|
|
|
2020-04-17 15:21:37 +08:00
|
|
|
$(obj)/$(offsets-file): $(obj)/arch/$(ARCH)/lib/asm-offsets.s FORCE
|
2015-03-27 09:59:03 +08:00
|
|
|
$(call filechk,offsets,__ASM_OFFSETS_H__)
|