mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-04 23:22:22 +01:00
81f3a59c46
efi, like the various ${MACHINE} directories, should have a dependency on
the enabled interpreters.
The general rule here is that any top-level directory that has a program at
any depth within that includes loader.mk should add ${INTERP_DEPENDS} added
to its dependencies so that the appropriate ficl/lua bits are ready before
they begin.
Note that the only directories in-tree that require it but will not get it
in a more appropriate manner are i386 (on amd64), efi, and userboot. i386
and userboot are handled explicitly in Makefile.amd64 where they are added
to S.yes.
Reported-by: bcran
(cherry picked from commit 7012461c9b
)
87 lines
1.6 KiB
Makefile
87 lines
1.6 KiB
Makefile
# $FreeBSD$
|
|
|
|
.include <src.opts.mk>
|
|
|
|
# For amd64 we have to build 32 and 64 bit versions of things. For
|
|
# others we don't. LIB32LIST is a list of libraries, which if
|
|
# included, need to be built 32-bit as well.
|
|
.if ${MACHINE_ARCH} == "amd64"
|
|
LIB32LIST=libsa
|
|
.if ${MK_FORTH} != "no"
|
|
LIB32LIST+= ficl
|
|
.endif
|
|
.if ${MK_LOADER_LUA} != "no"
|
|
LIB32LIST+= liblua
|
|
.endif
|
|
.endif
|
|
|
|
S.yes+= libsa
|
|
|
|
S.${MK_LOADER_OFW}+= libofw
|
|
S.${MK_FDT}+= fdt
|
|
|
|
S.${MK_FORTH}+= ficl
|
|
S.${MK_FORTH}+= forth
|
|
S.${MK_LOADER_LUA}+= liblua
|
|
S.${MK_LOADER_LUA}+= lua
|
|
S.yes+= defaults
|
|
S.yes+= fonts
|
|
S.yes+= images
|
|
S.yes+= man
|
|
|
|
.if ${MK_FORTH} != "no"
|
|
INTERP_DEPENDS+= forth
|
|
.endif
|
|
.if ${MK_LOADER_LUA} != "no"
|
|
INTERP_DEPENDS+= lua
|
|
.endif
|
|
|
|
.include <bsd.arch.inc.mk>
|
|
|
|
S.${MK_EFI}+= efi
|
|
S.${MK_LOADER_UBOOT}+= uboot
|
|
|
|
.if defined(LIB32LIST)
|
|
LIB32DEPENDS= ${LIB32LIST:S/$/32/}
|
|
.endif
|
|
|
|
.if exists(${.CURDIR}/${MACHINE}/.)
|
|
S.yes+= ${MACHINE}
|
|
SUBDIR_DEPEND_${MACHINE}+= ${INTERP_DEPENDS}
|
|
.if ${MK_FDT} != "no"
|
|
SUBDIR_DEPEND_${MACHINE}+= fdt
|
|
.endif
|
|
.if ${MK_LOADER_UBOOT} != "no"
|
|
SUBDIR_DEPEND_${MACHINE}+= uboot
|
|
.endif
|
|
.if ${MK_LOADER_OFW} != "no"
|
|
SUBDIR_DEPEND_${MACHINE}+= libofw
|
|
.endif
|
|
.endif
|
|
|
|
# Build the actual subdir list from S.yes, adding in the 32-bit
|
|
# variant if necessary.
|
|
.for _x in ${S.yes}
|
|
SUBDIR+=${_x}
|
|
.if defined(LIB32LIST) && ${LIB32LIST:M${_x}}
|
|
SUBDIR+=${_x}32
|
|
.endif
|
|
.if ${_x} != "libsa"
|
|
SUBDIR_DEPEND_${_x}+= libsa
|
|
SUBDIR_DEPEND_${_x}32+= libsa32
|
|
.endif
|
|
.endfor
|
|
|
|
# Remaining dependencies
|
|
SUBDIR_DEPEND_forth+= ficl
|
|
SUBDIR_DEPEND_lua+= liblua
|
|
|
|
SUBDIR_DEPEND_efi+= ${INTERP_DEPENDS}
|
|
.if ${MK_FDT} != "no"
|
|
SUBDIR_DEPEND_efi+= fdt
|
|
.endif
|
|
|
|
SUBDIR_PARALLEL= yes
|
|
|
|
.include <bsd.subdir.mk>
|