blob: 1eac09159476b6022aa4abf37faaccde36f13dec [file] [log] [blame]
Masahiro Yamada77ddac82020-04-17 16:21:36 +09001# SPDX-License-Identifier: GPL-2.0
Masahiro Yamada5aed6ed2014-02-24 11:12:11 +09002#
3# Kbuild for top-level directory of U-Boot
Masahiro Yamada5aed6ed2014-02-24 11:12:11 +09004
Masahiro Yamada33ff3602015-03-27 10:59:01 +09005#####
Masahiro Yamada77ddac82020-04-17 16:21:36 +09006# Generate generic-asm-offsets.h
Masahiro Yamada33ff3602015-03-27 10:59:01 +09007
8generic-offsets-file := include/generated/generic-asm-offsets.h
9
10always := $(generic-offsets-file)
Masahiro Yamada1072aba2015-07-05 01:56:56 +090011targets := lib/asm-offsets.s
Masahiro Yamada33ff3602015-03-27 10:59:01 +090012
Masahiro Yamadadb4633e2020-04-17 16:21:37 +090013$(obj)/$(generic-offsets-file): $(obj)/lib/asm-offsets.s FORCE
Michal Mareke19b6e02015-03-27 10:59:03 +090014 $(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__)
Masahiro Yamada5aed6ed2014-02-24 11:12:11 +090015
16#####
Masahiro Yamada77ddac82020-04-17 16:21:36 +090017# Generate asm-offsets.h
Masahiro Yamada5aed6ed2014-02-24 11:12:11 +090018
Masahiro Yamada8226dfd2014-03-18 16:38:13 +090019ifneq ($(wildcard $(srctree)/arch/$(ARCH)/lib/asm-offsets.c),)
Masahiro Yamada5aed6ed2014-02-24 11:12:11 +090020offsets-file := include/generated/asm-offsets.h
21endif
22
23always += $(offsets-file)
Masahiro Yamada8226dfd2014-03-18 16:38:13 +090024targets += arch/$(ARCH)/lib/asm-offsets.s
Masahiro Yamada5aed6ed2014-02-24 11:12:11 +090025
Masahiro Yamada5aed6ed2014-02-24 11:12:11 +090026CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY
27
Masahiro Yamadadb4633e2020-04-17 16:21:37 +090028$(obj)/$(offsets-file): $(obj)/arch/$(ARCH)/lib/asm-offsets.s FORCE
Michal Mareke19b6e02015-03-27 10:59:03 +090029 $(call filechk,offsets,__ASM_OFFSETS_H__)