1# $FreeBSD$ 2 3.if ${.MAKE.MODE: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# XXX: This should be combined with external compiler support in Makefile.inc1 13# and local.meta.sys.mk (CROSS_TARGET_FLAGS) 14.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE} != "host" 15CFLAGS_LAST+= --sysroot=${SYSROOT} 16CXXFLAGS_LAST+= --sysroot=${SYSROOT} 17LDADD+= --sysroot=${SYSROOT} 18.elif ${MK_STAGING} == "yes" 19CFLAGS+= -isystem ${STAGE_INCLUDEDIR} 20# XXX: May be needed for GCC to build with libc++ rather than libstdc++. See Makefile.inc1 21#CXXFLAGS+= -std=gnu++11 22#LDADD+= -L${STAGE_LIBDIR}/libc++ 23#CXXFLAGS+= -I${STAGE_INCLUDEDIR}/usr/include/c++/v1 24LDADD+= -L${STAGE_LIBDIR} 25.endif 26 27.if ${MACHINE} == "host" 28.if ${.MAKE.DEPENDFILE:E} != "host" 29UPDATE_DEPENDFILE?= no 30.endif 31HOST_CFLAGS+= -DHOSTPROG 32CFLAGS+= ${HOST_CFLAGS} 33.endif 34 35.-include "src.init.mk" 36