1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5# For amd64 we have to build 32 and 64 bit versions of things. For 6# others we don't. LIB32LIST is a list of libraries, which if 7# included, need to be built 32-bit as well. 8.if ${MACHINE_ARCH} == "amd64" 9LIB32LIST=libsa 10.if ${MK_FORTH} != "no" 11LIB32LIST+= ficl 12.endif 13.if ${MK_LOADER_LUA} != "no" 14LIB32LIST+= liblua 15.endif 16.endif 17 18S.yes+= libsa 19 20S.${MK_LOADER_OFW}+= libofw 21S.${MK_FDT}+= fdt 22 23S.${MK_FORTH}+= ficl 24S.${MK_FORTH}+= forth 25S.${MK_LOADER_LUA}+= liblua 26S.${MK_LOADER_LUA}+= lua 27S.yes+= defaults 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_UBOOT}+= uboot 41 42.if defined(LIB32LIST) 43LIB32DEPENDS= ${LIB32LIST:S/$/32/} 44.endif 45 46.if exists(${.CURDIR}/${MACHINE}/.) 47S.yes+= ${MACHINE} 48SUBDIR_DEPEND_${MACHINE}+= ${INTERP_DEPENDS} 49.if ${MK_FDT} != "no" 50SUBDIR_DEPEND_${MACHINE}+= fdt 51.endif 52.if ${MK_LOADER_UBOOT} != "no" 53SUBDIR_DEPEND_${MACHINE}+= uboot 54.endif 55.if ${MK_LOADER_OFW} != "no" 56SUBDIR_DEPEND_${MACHINE}+= libofw 57.endif 58.endif 59 60# Build the actual subdir list from S.yes, adding in the 32-bit 61# variant if necessary. 62.for _x in ${S.yes} 63SUBDIR+=${_x} 64.if defined(LIB32LIST) && ${LIB32LIST:M${_x}} 65SUBDIR+=${_x}32 66.endif 67.if ${_x} != "libsa" 68SUBDIR_DEPEND_${_x}+= libsa 69SUBDIR_DEPEND_${_x}32+= libsa32 70.endif 71.endfor 72 73# Remaining dependencies 74SUBDIR_DEPEND_libsa32+= libsa 75 76SUBDIR_DEPEND_forth+= ficl 77SUBDIR_DEPEND_lua+= liblua 78 79SUBDIR_DEPEND_efi+= fdt 80 81SUBDIR_PARALLEL= yes 82 83.include <bsd.subdir.mk> 84