Masahiro Yamada | 77ddac8 | 2020-04-17 16:21:36 +0900 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 2 | # |
| 3 | # Kbuild for top-level directory of U-Boot |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 4 | |
Masahiro Yamada | 33ff360 | 2015-03-27 10:59:01 +0900 | [diff] [blame] | 5 | ##### |
Masahiro Yamada | 77ddac8 | 2020-04-17 16:21:36 +0900 | [diff] [blame] | 6 | # Generate generic-asm-offsets.h |
Masahiro Yamada | 33ff360 | 2015-03-27 10:59:01 +0900 | [diff] [blame] | 7 | |
| 8 | generic-offsets-file := include/generated/generic-asm-offsets.h |
| 9 | |
| 10 | always := $(generic-offsets-file) |
Masahiro Yamada | 1072aba | 2015-07-05 01:56:56 +0900 | [diff] [blame] | 11 | targets := lib/asm-offsets.s |
Masahiro Yamada | 33ff360 | 2015-03-27 10:59:01 +0900 | [diff] [blame] | 12 | |
Marek BehĂșn | d72a3b7 | 2021-05-20 13:24:03 +0200 | [diff] [blame^] | 13 | CFLAGS_REMOVE_asm-offsets.o := $(LTO_CFLAGS) |
| 14 | |
Masahiro Yamada | db4633e | 2020-04-17 16:21:37 +0900 | [diff] [blame] | 15 | $(obj)/$(generic-offsets-file): $(obj)/lib/asm-offsets.s FORCE |
Michal Marek | e19b6e0 | 2015-03-27 10:59:03 +0900 | [diff] [blame] | 16 | $(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__) |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 17 | |
| 18 | ##### |
Masahiro Yamada | 77ddac8 | 2020-04-17 16:21:36 +0900 | [diff] [blame] | 19 | # Generate asm-offsets.h |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 20 | |
Masahiro Yamada | 8226dfd | 2014-03-18 16:38:13 +0900 | [diff] [blame] | 21 | ifneq ($(wildcard $(srctree)/arch/$(ARCH)/lib/asm-offsets.c),) |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 22 | offsets-file := include/generated/asm-offsets.h |
| 23 | endif |
| 24 | |
| 25 | always += $(offsets-file) |
Masahiro Yamada | 8226dfd | 2014-03-18 16:38:13 +0900 | [diff] [blame] | 26 | targets += arch/$(ARCH)/lib/asm-offsets.s |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 27 | |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 28 | CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY |
| 29 | |
Masahiro Yamada | db4633e | 2020-04-17 16:21:37 +0900 | [diff] [blame] | 30 | $(obj)/$(offsets-file): $(obj)/arch/$(ARCH)/lib/asm-offsets.s FORCE |
Michal Marek | e19b6e0 | 2015-03-27 10:59:03 +0900 | [diff] [blame] | 31 | $(call filechk,offsets,__ASM_OFFSETS_H__) |