1.include <src.opts.mk> 2 3# For amd64 we have to build 32 and 64 bit versions of things. For 4# others we don't. LIB32LIST is a list of libraries, which if 5# included, need to be built 32-bit as well. 6.if ${MACHINE_ARCH} == "amd64" 7LIB32LIST=libsa 8.if ${MK_FORTH} != "no" 9LIB32LIST+= ficl 10.endif 11.if ${MK_LOADER_LUA} != "no" 12LIB32LIST+= liblua 13.endif 14.endif 15 16S.yes+= libsa 17 18S.${MK_LOADER_OFW}+= libofw 19S.${MK_FDT}+= fdt 20 21S.${MK_FORTH}+= ficl 22S.${MK_FORTH}+= forth 23S.${MK_LOADER_LUA}+= liblua 24S.${MK_LOADER_LUA}+= lua 25S.yes+= defaults 26S.yes+= fonts 27S.yes+= images 28S.yes+= man 29 30.if ${MK_FORTH} != "no" 31INTERP_DEPENDS+= forth 32.endif 33.if ${MK_LOADER_LUA} != "no" 34INTERP_DEPENDS+= lua 35.endif 36 37.include <bsd.arch.inc.mk> 38 39S.${MK_EFI}+= efi 40S.${MK_LOADER_KBOOT}+= kboot 41S.${MK_LOADER_UBOOT}+= uboot 42 43.if defined(LIB32LIST) 44LIB32DEPENDS= ${LIB32LIST:S/$/32/} 45.endif 46 47.if exists(${.CURDIR}/${MACHINE}/.) 48S.yes+= ${MACHINE} 49SUBDIR_DEPEND_${MACHINE}+= ${INTERP_DEPENDS} 50.if ${MK_FDT} != "no" 51SUBDIR_DEPEND_${MACHINE}+= fdt 52.endif 53.if ${MK_LOADER_UBOOT} != "no" 54SUBDIR_DEPEND_${MACHINE}+= uboot 55.endif 56.if ${MK_LOADER_OFW} != "no" 57SUBDIR_DEPEND_${MACHINE}+= libofw 58.endif 59.endif 60 61# Build the actual subdir list from S.yes, adding in the 32-bit 62# variant if necessary. 63.for _x in ${S.yes} 64SUBDIR+=${_x} 65.if defined(LIB32LIST) && ${LIB32LIST:M${_x}} 66SUBDIR+=${_x}32 67INTERP_DEPENDS+=${_x}32 68.endif 69.if ${_x} != "libsa" 70SUBDIR_DEPEND_${_x}+= libsa 71SUBDIR_DEPEND_${_x}32+= libsa32 72.endif 73.endfor 74 75# Remaining dependencies 76SUBDIR_DEPEND_forth+= ficl 77SUBDIR_DEPEND_lua+= liblua 78 79SUBDIR_DEPEND_efi+= ${INTERP_DEPENDS} 80SUBDIR_DEPEND_kboot+= ${INTERP_DEPENDS} 81.if ${MK_FDT} != "no" 82SUBDIR_DEPEND_efi+= fdt 83SUBDIR_DEPEND_kboot+= fdt 84.endif 85 86SUBDIR_DEPEND_uboot+= ${INTERP_DEPENDS} 87.if ${MK_FDT} != "no" 88SUBDIR_DEPEND_uboot+= fdt 89.endif 90 91SUBDIR_PARALLEL= yes 92 93.include <bsd.subdir.mk> 94 95# Simplified way to build-test the most important build combinations for the 96# loader. 97universe: 98 sh ${SRCTOP}/tools/boot/universe.sh 99