2015-06-13 21:20:56 +02:00
|
|
|
# $FreeBSD$
|
2012-08-22 21:25:57 +02:00
|
|
|
|
2016-01-19 23:41:44 +01:00
|
|
|
.if ${.MAKE.MODE:Mmeta*} != ""
|
2012-08-22 21:25:57 +02: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 20:45:01 +01:00
|
|
|
# XXX: This should be combined with external compiler support in Makefile.inc1
|
|
|
|
# and local.meta.sys.mk (CROSS_TARGET_FLAGS)
|
2015-10-07 02:28:24 +02:00
|
|
|
.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE} != "host"
|
2014-05-16 16:53:15 +02:00
|
|
|
CFLAGS_LAST+= --sysroot=${SYSROOT}
|
|
|
|
CXXFLAGS_LAST+= --sysroot=${SYSROOT}
|
|
|
|
LDADD+= --sysroot=${SYSROOT}
|
2015-05-26 23:44:15 +02:00
|
|
|
.elif ${MK_STAGING} == "yes"
|
2015-11-25 20:45:01 +01: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 23:44:15 +02:00
|
|
|
LDADD+= -L${STAGE_LIBDIR}
|
|
|
|
.endif
|
2014-05-16 16:53:15 +02:00
|
|
|
|
2012-08-22 21:25:57 +02:00
|
|
|
.if ${MACHINE} == "host"
|
2014-05-16 16:53:15 +02:00
|
|
|
.if ${.MAKE.DEPENDFILE:E} != "host"
|
|
|
|
UPDATE_DEPENDFILE?= no
|
|
|
|
.endif
|
2012-08-22 21:25:57 +02:00
|
|
|
HOST_CFLAGS+= -DHOSTPROG
|
|
|
|
CFLAGS+= ${HOST_CFLAGS}
|
|
|
|
.endif
|
2015-11-05 23:28:31 +01:00
|
|
|
|
|
|
|
.-include "src.init.mk"
|