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 | |
Michal Marek | e19b6e0 | 2015-03-27 10:59:03 +0900 | [diff] [blame] | 13 | $(obj)/$(generic-offsets-file): lib/asm-offsets.s FORCE |
| 14 | $(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__) |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 15 | |
| 16 | ##### |
Masahiro Yamada | 77ddac8 | 2020-04-17 16:21:36 +0900 | [diff] [blame] | 17 | # Generate asm-offsets.h |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 18 | |
Masahiro Yamada | 8226dfd | 2014-03-18 16:38:13 +0900 | [diff] [blame] | 19 | ifneq ($(wildcard $(srctree)/arch/$(ARCH)/lib/asm-offsets.c),) |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 20 | offsets-file := include/generated/asm-offsets.h |
| 21 | endif |
| 22 | |
| 23 | always += $(offsets-file) |
Masahiro Yamada | 8226dfd | 2014-03-18 16:38:13 +0900 | [diff] [blame] | 24 | targets += arch/$(ARCH)/lib/asm-offsets.s |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 25 | |
Masahiro Yamada | 5aed6ed | 2014-02-24 11:12:11 +0900 | [diff] [blame] | 26 | CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY |
| 27 | |
Michal Marek | e19b6e0 | 2015-03-27 10:59:03 +0900 | [diff] [blame] | 28 | $(obj)/$(offsets-file): arch/$(ARCH)/lib/asm-offsets.s FORCE |
| 29 | $(call filechk,offsets,__ASM_OFFSETS_H__) |