Masahiro Yamada | b5a2046 | 2020-04-17 16:21:36 +0900 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Masahiro Yamada | 6a44d80 | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 2 | # |
| 3 | # Kbuild for top-level directory of U-Boot |
Masahiro Yamada | 6a44d80 | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 4 | |
Masahiro Yamada | 490cf5f | 2015-03-27 10:59:01 +0900 | [diff] [blame] | 5 | ##### |
Masahiro Yamada | b5a2046 | 2020-04-17 16:21:36 +0900 | [diff] [blame] | 6 | # Generate generic-asm-offsets.h |
Masahiro Yamada | 490cf5f | 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 | ba84de9 | 2015-07-05 01:56:56 +0900 | [diff] [blame] | 11 | targets := lib/asm-offsets.s |
Masahiro Yamada | 490cf5f | 2015-03-27 10:59:01 +0900 | [diff] [blame] | 12 | |
Marek BehĂșn | c109498 | 2021-05-20 13:24:03 +0200 | [diff] [blame] | 13 | CFLAGS_REMOVE_asm-offsets.o := $(LTO_CFLAGS) |
| 14 | |
Masahiro Yamada | f34d0ad | 2020-04-17 16:21:37 +0900 | [diff] [blame] | 15 | $(obj)/$(generic-offsets-file): $(obj)/lib/asm-offsets.s FORCE |
Michal Marek | 3a4f6b6 | 2015-03-27 10:59:03 +0900 | [diff] [blame] | 16 | $(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__) |
Masahiro Yamada | 6a44d80 | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 17 | |
| 18 | ##### |
Masahiro Yamada | b5a2046 | 2020-04-17 16:21:36 +0900 | [diff] [blame] | 19 | # Generate asm-offsets.h |
Masahiro Yamada | 6a44d80 | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 20 | |
Masahiro Yamada | 254d68b | 2014-03-18 16:38:13 +0900 | [diff] [blame] | 21 | ifneq ($(wildcard $(srctree)/arch/$(ARCH)/lib/asm-offsets.c),) |
Masahiro Yamada | 6a44d80 | 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 | 254d68b | 2014-03-18 16:38:13 +0900 | [diff] [blame] | 26 | targets += arch/$(ARCH)/lib/asm-offsets.s |
Masahiro Yamada | 6a44d80 | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 27 | |
Masahiro Yamada | 6a44d80 | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 28 | CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY |
| 29 | |
Masahiro Yamada | f34d0ad | 2020-04-17 16:21:37 +0900 | [diff] [blame] | 30 | $(obj)/$(offsets-file): $(obj)/arch/$(ARCH)/lib/asm-offsets.s FORCE |
Michal Marek | 3a4f6b6 | 2015-03-27 10:59:03 +0900 | [diff] [blame] | 31 | $(call filechk,offsets,__ASM_OFFSETS_H__) |