1# $FreeBSD$ 2 3.if ${.MAKE.MODE:Unormal:Mmeta*} != "" 4.if !empty(SUBDIR) && !defined(LIB) && !defined(PROG) && ${.MAKE.MAKEFILES:M*bsd.prog.mk} == "" 5.if ${.MAKE.MODE:Mleaf*} != "" 6# we only want leaf dirs to build in meta mode... and we are not one 7.MAKE.MODE = normal 8.endif 9.endif 10.endif 11 12.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE} != "host" 13CFLAGS_LAST+= --sysroot=${SYSROOT} 14CXXFLAGS_LAST+= --sysroot=${SYSROOT} 15LDADD+= --sysroot=${SYSROOT} 16.elif ${MK_STAGING} == "yes" 17CFLAGS+= -nostdinc 18CFLAGS+= -I${STAGE_INCLUDEDIR} 19LDADD+= -L${STAGE_LIBDIR} 20.endif 21.if ${MACHINE} == "host" 22# we cheat? 23LDADD+= -B/usr/lib 24CFLAGS_LAST+= -I/usr/include 25CXXFLAGS_LAST+= -I/usr/include 26.endif 27 28.if ${MACHINE} == "host" 29.if ${.MAKE.DEPENDFILE:E} != "host" 30UPDATE_DEPENDFILE?= no 31.endif 32HOST_CC?= /usr/bin/cc 33CC= ${HOST_CC} 34HOST_CXX?= /usr/bin/c++ 35CXX= ${HOST_CXX} 36HOST_CPP?= /usr/bin/cpp 37CPP= ${HOST_CPP} 38HOST_CFLAGS+= -DHOSTPROG 39CFLAGS+= ${HOST_CFLAGS} 40.endif 41