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