blob: 6014f7c34ac4298fc1f29e45d60289d1e72b3f37 [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
Michal Mareke19b6e02015-03-27 10:59:03 +090013$(obj)/$(generic-offsets-file): lib/asm-offsets.s FORCE
14 $(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
Michal Mareke19b6e02015-03-27 10:59:03 +090028$(obj)/$(offsets-file): arch/$(ARCH)/lib/asm-offsets.s FORCE
29 $(call filechk,offsets,__ASM_OFFSETS_H__)