1# $FreeBSD$ 2 3# local configuration specific to meta mode 4# before we process TARGET_SPEC 5# we assume that MK_DIRDEPS_BUILD=yes 6 7.if !defined(HOST_TARGET) || !defined(HOST_MACHINE) 8# we need HOST_TARGET etc below. 9.include <host-target.mk> 10.export HOST_TARGET 11.endif 12 13# from src/Makefile (for universe) 14TARGET_ARCHES_arm?= arm armv6 armv7 15TARGET_ARCHES_arm64?= aarch64 16TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpc64le powerpcspe 17TARGET_ARCHES_riscv?= riscv64 18 19# some corner cases 20BOOT_MACHINE_DIR.amd64 = boot/i386 21MACHINE_ARCH.host = ${_HOST_ARCH} 22 23# the list of machines we support 24ALL_MACHINE_LIST?= amd64 arm arm64 i386 powerpc riscv 25 26.-include <site.meta.sys.env.mk> 27 28.for m in ${ALL_MACHINE_LIST:O:u} 29MACHINE_ARCH_LIST.$m?= ${TARGET_ARCHES_${m}:U$m} 30MACHINE_ARCH.$m?= ${MACHINE_ARCH_LIST.$m:[1]} 31BOOT_MACHINE_DIR.$m ?= boot/$m 32.endfor 33 34.if empty(MACHINE_ARCH) 35.if !empty(TARGET_ARCH) 36MACHINE_ARCH= ${TARGET_ARCH} 37.else 38MACHINE_ARCH= ${MACHINE_ARCH.${MACHINE}} 39.endif 40.endif 41MACHINE_ARCH?= ${MACHINE_ARCH.${MACHINE}} 42MACHINE_ARCH:= ${MACHINE_ARCH} 43 44# For universe we want to potentially 45# build for multiple MACHINE_ARCH per MACHINE 46# so we need more than MACHINE in TARGET_SPEC 47TARGET_SPEC_VARS?= MACHINE MACHINE_ARCH 48 49HOST_OBJTOP ?= ${OBJROOT}${HOST_TARGET} 50 51.if ${REQUESTED_MACHINE:U${MACHINE}} == "host" 52MACHINE= host 53.if ${TARGET_MACHINE:Uno} == ${HOST_TARGET} 54# not what we want 55TARGET_MACHINE= host 56.endif 57.endif 58.if ${MACHINE} == "host" 59OBJTOP := ${HOST_OBJTOP} 60MACHINE_ARCH= ${MACHINE_ARCH.${MACHINE}} 61.endif 62 63.if ${.MAKE.LEVEL} == 0 || empty(PYTHON) 64PYTHON ?= /usr/local/bin/python 65.export PYTHON 66# _SKIP_BUILD is not 100% as it requires wrapping all 'all:' targets to avoid 67# building in MAKELEVEL0. Just prohibit 'all' entirely in this case to avoid 68# problems. 69.if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL} == 0 70.MAIN: dirdeps 71.if make(all) 72.error DIRDEPS_BUILD: Please run '${MAKE}' instead of '${MAKE} all'. 73.endif 74.endif 75.endif 76 77# this is sufficient for most of the tree. 78.MAKE.DEPENDFILE_DEFAULT = ${.MAKE.DEPENDFILE_PREFIX} 79 80# but if we have a machine qualified file it should be used in preference 81.MAKE.DEPENDFILE_PREFERENCE = \ 82 ${.MAKE.DEPENDFILE_PREFIX}.${MACHINE} \ 83 ${.MAKE.DEPENDFILE_PREFIX} 84 85.undef .MAKE.DEPENDFILE 86 87META_MODE+= missing-meta=yes 88.if empty(META_MODE:Mnofilemon) 89META_MODE+= missing-filemon=yes 90.endif 91 92.if make(showconfig) 93# this does not need/want filemon 94UPDATE_DEPENDFILE= NO 95.endif 96