1ca987d46SWarner Losh# $FreeBSD$ 2ca987d46SWarner Losh 3ca987d46SWarner Losh.include <src.opts.mk> 4ca987d46SWarner Losh 5f86dd996SWarner Losh# For amd64 we have to build 32 and 64 bit versions of things. For 6f86dd996SWarner Losh# others we don't. LIB32LIST is a list of libraries, which if 7f86dd996SWarner Losh# included, need to be built 32-bit as well. 8f86dd996SWarner Losh.if ${MACHINE_ARCH} == "amd64" 98b4c3a03SKyle EvansLIB32LIST=libsa 108b4c3a03SKyle Evans.if ${MK_FORTH} != "no" 118b4c3a03SKyle EvansLIB32LIST+= ficl 128b4c3a03SKyle Evans.endif 138b4c3a03SKyle Evans.if ${MK_LOADER_LUA} != "no" 148b4c3a03SKyle EvansLIB32LIST+= liblua 158b4c3a03SKyle Evans.endif 167cafeaa1SWarner Losh.endif 17ca987d46SWarner Losh 18f86dd996SWarner LoshS.yes+= libsa 19f86dd996SWarner Losh 20ac5f382aSKyle EvansS.${MK_LOADER_OFW}+= libofw 21ac5f382aSKyle EvansS.${MK_FDT}+= fdt 22ac5f382aSKyle Evans 23f86dd996SWarner LoshS.${MK_FORTH}+= ficl 24f86dd996SWarner LoshS.${MK_FORTH}+= forth 25f86dd996SWarner LoshS.${MK_LOADER_LUA}+= liblua 26f86dd996SWarner LoshS.${MK_LOADER_LUA}+= lua 27f86dd996SWarner LoshS.yes+= defaults 283630506bSToomas SoomeS.yes+= fonts 293630506bSToomas SoomeS.yes+= images 30f86dd996SWarner LoshS.yes+= man 31f86dd996SWarner Losh 32ac5f382aSKyle Evans.if ${MK_FORTH} != "no" 33ac5f382aSKyle EvansINTERP_DEPENDS+= forth 34ac5f382aSKyle Evans.endif 35ac5f382aSKyle Evans.if ${MK_LOADER_LUA} != "no" 36ac5f382aSKyle EvansINTERP_DEPENDS+= lua 37ac5f382aSKyle Evans.endif 38ac5f382aSKyle Evans 39ca987d46SWarner Losh.include <bsd.arch.inc.mk> 40ca987d46SWarner Losh 41f86dd996SWarner LoshS.${MK_EFI}+= efi 42f86dd996SWarner LoshS.${MK_LOADER_UBOOT}+= uboot 439e74797fSWarner Losh 44ac5f382aSKyle Evans.if defined(LIB32LIST) 45ac5f382aSKyle EvansLIB32DEPENDS= ${LIB32LIST:S/$/32/} 46ac5f382aSKyle Evans.endif 47ac5f382aSKyle Evans 48ca987d46SWarner Losh.if exists(${.CURDIR}/${MACHINE}/.) 49f86dd996SWarner LoshS.yes+= ${MACHINE} 50ac5f382aSKyle EvansSUBDIR_DEPEND_${MACHINE}+= ${INTERP_DEPENDS} 51ac5f382aSKyle Evans.if ${MK_FDT} != "no" 52ac5f382aSKyle EvansSUBDIR_DEPEND_${MACHINE}+= fdt 53ac5f382aSKyle Evans.endif 54ac5f382aSKyle Evans.if ${MK_LOADER_UBOOT} != "no" 55ac5f382aSKyle EvansSUBDIR_DEPEND_${MACHINE}+= uboot 56ac5f382aSKyle Evans.endif 57ac5f382aSKyle Evans.if ${MK_LOADER_OFW} != "no" 58ac5f382aSKyle EvansSUBDIR_DEPEND_${MACHINE}+= libofw 59ac5f382aSKyle Evans.endif 60ca987d46SWarner Losh.endif 61ca987d46SWarner Losh 62f86dd996SWarner Losh# Build the actual subdir list from S.yes, adding in the 32-bit 63f86dd996SWarner Losh# variant if necessary. 64f86dd996SWarner Losh.for _x in ${S.yes} 65f86dd996SWarner LoshSUBDIR+=${_x} 66f86dd996SWarner Losh.if defined(LIB32LIST) && ${LIB32LIST:M${_x}} 67f86dd996SWarner LoshSUBDIR+=${_x}32 68f86dd996SWarner Losh.endif 69ac5f382aSKyle Evans.if ${_x} != "libsa" 70ac5f382aSKyle EvansSUBDIR_DEPEND_${_x}+= libsa 71ac5f382aSKyle EvansSUBDIR_DEPEND_${_x}32+= libsa32 72ac5f382aSKyle Evans.endif 73f86dd996SWarner Losh.endfor 74f86dd996SWarner Losh 75ac5f382aSKyle Evans# Remaining dependencies 76ac5f382aSKyle EvansSUBDIR_DEPEND_libsa32+= libsa 77ac5f382aSKyle Evans 78ac5f382aSKyle EvansSUBDIR_DEPEND_forth+= ficl 79ac5f382aSKyle EvansSUBDIR_DEPEND_lua+= liblua 80ac5f382aSKyle Evans 81e41367e3SKyle Evans.if ${MK_FDT} != "no" 82ac5f382aSKyle EvansSUBDIR_DEPEND_efi+= fdt 83e41367e3SKyle Evans.endif 84ac5f382aSKyle Evans 85ac5f382aSKyle EvansSUBDIR_PARALLEL= yes 86ac5f382aSKyle Evans 87ca987d46SWarner Losh.include <bsd.subdir.mk> 88