17750ad47SMarcel Moolenaar 264b522daSSimon J. Gerraty.if !target(__${_this}__) 364b522daSSimon J. Gerraty__${_this}__: 464b522daSSimon J. Gerraty 50b6ba3f2SBryan Drewery.if ${.MAKE.MODE:Mmeta*} != "" 67750ad47SMarcel Moolenaar.if !empty(SUBDIR) && !defined(LIB) && !defined(PROG) && ${.MAKE.MAKEFILES:M*bsd.prog.mk} == "" 77750ad47SMarcel Moolenaar.if ${.MAKE.MODE:Mleaf*} != "" 87750ad47SMarcel Moolenaar# we only want leaf dirs to build in meta mode... and we are not one 97750ad47SMarcel Moolenaar.MAKE.MODE = normal 107750ad47SMarcel Moolenaar.endif 117750ad47SMarcel Moolenaar.endif 127750ad47SMarcel Moolenaar.endif 137750ad47SMarcel Moolenaar 142802302eSBryan Drewery# XXX: This should be combined with external compiler support in Makefile.inc1 152802302eSBryan Drewery# and local.meta.sys.mk (CROSS_TARGET_FLAGS) 16*f9df6097SSimon J. Gerraty.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE:Nhost*} != "" 1759dd53f1SSimon J. GerratyCFLAGS_LAST+= --sysroot=${SYSROOT} 1859dd53f1SSimon J. GerratyCXXFLAGS_LAST+= --sysroot=${SYSROOT} 1959dd53f1SSimon J. GerratyLDADD+= --sysroot=${SYSROOT} 204113aa90SSimon J. Gerraty.elif ${MK_STAGING} == "yes" 218561d0b2SSimon J. GerratyISYSTEM?= ${STAGE_INCLUDEDIR} 228561d0b2SSimon J. Gerraty# no space after -isystem makes it easier to 238561d0b2SSimon J. Gerraty# grep the flag out of command lines (in meta files) to see its value. 248561d0b2SSimon J. GerratyCFLAGS+= -isystem${ISYSTEM} 252802302eSBryan Drewery# XXX: May be needed for GCC to build with libc++ rather than libstdc++. See Makefile.inc1 262802302eSBryan Drewery#CXXFLAGS+= -std=gnu++11 272802302eSBryan Drewery#LDADD+= -L${STAGE_LIBDIR}/libc++ 282802302eSBryan Drewery#CXXFLAGS+= -I${STAGE_INCLUDEDIR}/usr/include/c++/v1 294113aa90SSimon J. GerratyLDADD+= -L${STAGE_LIBDIR} 304113aa90SSimon J. Gerraty.endif 3159dd53f1SSimon J. Gerraty 32*f9df6097SSimon J. Gerraty.if ${MACHINE:Nhost*} == "" 33*f9df6097SSimon J. Gerraty.if ${.MAKE.DEPENDFILE:E:Nhost*} != "" 3459dd53f1SSimon J. GerratyUPDATE_DEPENDFILE?= no 3559dd53f1SSimon J. Gerraty.endif 365c5948acSBryan DreweryHOST_CFLAGS+= -DHOSTPROG 377750ad47SMarcel MoolenaarCFLAGS+= ${HOST_CFLAGS} 387750ad47SMarcel Moolenaar.endif 39208f1083SBryan Drewery 40208f1083SBryan Drewery.-include "src.init.mk" 41073ccb9dSSimon J. Gerraty.-include <site.init.mk> 4264b522daSSimon J. Gerraty.-include "${.CURDIR}/local.init.mk" 4364b522daSSimon J. Gerraty.endif 44