2015-06-13 19:20:56 +00:00
|
|
|
# $FreeBSD$
|
2012-08-22 19:25:57 +00:00
|
|
|
|
2014-08-19 06:50:54 +00:00
|
|
|
.if ${.MAKE.MODE:Unormal: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
|
|
|
|
|
2014-05-16 14:53:15 +00:00
|
|
|
.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT)
|
|
|
|
CFLAGS_LAST+= --sysroot=${SYSROOT}
|
|
|
|
CXXFLAGS_LAST+= --sysroot=${SYSROOT}
|
|
|
|
LDADD+= --sysroot=${SYSROOT}
|
2015-05-26 21:44:15 +00:00
|
|
|
.elif ${MK_STAGING} == "yes"
|
|
|
|
CFLAGS+= -I${STAGE_INCLUDEDIR}
|
|
|
|
LDADD+= -L${STAGE_LIBDIR}
|
|
|
|
.endif
|
2014-05-16 14:53:15 +00:00
|
|
|
.if ${MACHINE} == "host"
|
|
|
|
# we cheat?
|
|
|
|
LDADD+= -B/usr/lib
|
|
|
|
CFLAGS_LAST+= -I/usr/include
|
|
|
|
CXXFLAGS_LAST+= -I/usr/include
|
|
|
|
.endif
|
|
|
|
|
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
|
2015-09-30 23:14:23 +00:00
|
|
|
HOST_CC?= /usr/bin/cc
|
|
|
|
CC= ${HOST_CC}
|
|
|
|
HOST_CXX?= /usr/bin/c++
|
|
|
|
CXX= ${HOST_CXX}
|
|
|
|
HOST_CPP?= /usr/bin/cpp
|
|
|
|
CPP= ${HOST_CPP}
|
2012-08-22 19:25:57 +00:00
|
|
|
HOST_CFLAGS+= -DHOSTPROG
|
|
|
|
CFLAGS+= ${HOST_CFLAGS}
|
|
|
|
.endif
|