2015-06-13 19:20:56 +00:00
|
|
|
# $FreeBSD$
|
2012-08-22 19:25:57 +00:00
|
|
|
|
2020-03-31 15:59:29 +00:00
|
|
|
.if !target(__${_this}__)
|
|
|
|
__${_this}__:
|
|
|
|
|
2016-01-19 22:41:44 +00:00
|
|
|
.if ${.MAKE.MODE:Mmeta*} != ""
|
2012-08-22 19:25:57 +00:00
|
|
|
.if !empty(SUBDIR) && !defined(LIB) && !defined(PROG) && ${.MAKE.MAKEFILES:M*bsd.prog.mk} == ""
|
|
|
|
.if ${.MAKE.MODE:Mleaf*} != ""
|
|
|
|
# we only want leaf dirs to build in meta mode... and we are not one
|
|
|
|
.MAKE.MODE = normal
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2015-11-25 19:45:01 +00:00
|
|
|
# XXX: This should be combined with external compiler support in Makefile.inc1
|
|
|
|
# and local.meta.sys.mk (CROSS_TARGET_FLAGS)
|
2015-10-07 00:28:24 +00:00
|
|
|
.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE} != "host"
|
2014-05-16 14:53:15 +00:00
|
|
|
CFLAGS_LAST+= --sysroot=${SYSROOT}
|
|
|
|
CXXFLAGS_LAST+= --sysroot=${SYSROOT}
|
|
|
|
LDADD+= --sysroot=${SYSROOT}
|
2015-05-26 21:44:15 +00:00
|
|
|
.elif ${MK_STAGING} == "yes"
|
2015-11-25 19:45:01 +00:00
|
|
|
CFLAGS+= -isystem ${STAGE_INCLUDEDIR}
|
|
|
|
# XXX: May be needed for GCC to build with libc++ rather than libstdc++. See Makefile.inc1
|
|
|
|
#CXXFLAGS+= -std=gnu++11
|
|
|
|
#LDADD+= -L${STAGE_LIBDIR}/libc++
|
|
|
|
#CXXFLAGS+= -I${STAGE_INCLUDEDIR}/usr/include/c++/v1
|
2015-05-26 21:44:15 +00:00
|
|
|
LDADD+= -L${STAGE_LIBDIR}
|
|
|
|
.endif
|
2014-05-16 14:53:15 +00:00
|
|
|
|
2012-08-22 19:25:57 +00:00
|
|
|
.if ${MACHINE} == "host"
|
2014-05-16 14:53:15 +00:00
|
|
|
.if ${.MAKE.DEPENDFILE:E} != "host"
|
|
|
|
UPDATE_DEPENDFILE?= no
|
|
|
|
.endif
|
2012-08-22 19:25:57 +00:00
|
|
|
HOST_CFLAGS+= -DHOSTPROG
|
|
|
|
CFLAGS+= ${HOST_CFLAGS}
|
|
|
|
.endif
|
2015-11-05 22:28:31 +00:00
|
|
|
|
|
|
|
.-include "src.init.mk"
|
2020-03-31 15:59:29 +00:00
|
|
|
.-include "${.CURDIR}/local.init.mk"
|
|
|
|
.endif
|