1 ## SPDX-License-Identifier: GPL-2.0-only
3 build_dir
=$(CURDIR
)/build
4 skiboot_dir
=$(CURDIR
)/skiboot
5 skiboot_git_repo
=$(CONFIG_SKIBOOT_GIT_REPO
)
6 skiboot_revision
=$(CONFIG_SKIBOOT_REVISION
)
7 skiboot_elf
=$(build_dir
)/skiboot.elf
8 skiboot_cross
=$(or
$(CROSS
),powerpc64-linux-gnu-
)
10 unexport $(COREBOOT_EXPORTS
)
12 .PHONY
: all clean distclean
16 $(skiboot_elf
): |
$(skiboot_dir
) $(build_dir
)
17 +$(MAKE
) -C
$(skiboot_dir
) CROSS
="$(skiboot_cross)"
18 cp
$(skiboot_dir
)/skiboot.elf
$@
19 # skiboot is always built with debug information due to unconditional -ggdb
20 $(skiboot_cross
)strip $@
23 git clone
$(skiboot_git_repo
) $(skiboot_dir
)
24 git
-C
$(skiboot_dir
) checkout
$(skiboot_revision
)
33 # Redefine RM because it's used like `$(RM) non-existent-file`
34 # Also ignore useless messages about removing test files
35 [ ! -d
$(skiboot_dir
) ] || \
36 $(MAKE
) -C
$(skiboot_dir
) RM
="rm -rf" CROSS
="$(skiboot_cross)" clean > /dev
/null