2015-06-13 21:20:56 +02:00
|
|
|
# $FreeBSD$
|
2012-08-22 21:25:57 +02:00
|
|
|
|
2014-08-19 08:50:54 +02:00
|
|
|
.if ${.MAKE.MODE:Unormal: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-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-10-07 02:28:24 +02:00
|
|
|
CFLAGS+= -nostdinc
|
2015-05-26 23:44:15 +02:00
|
|
|
CFLAGS+= -I${STAGE_INCLUDEDIR}
|
|
|
|
LDADD+= -L${STAGE_LIBDIR}
|
|
|
|
.endif
|
2014-05-16 16:53:15 +02:00
|
|
|
.if ${MACHINE} == "host"
|
|
|
|
# we cheat?
|
|
|
|
LDADD+= -B/usr/lib
|
|
|
|
CFLAGS_LAST+= -I/usr/include
|
|
|
|
CXXFLAGS_LAST+= -I/usr/include
|
|
|
|
.endif
|
|
|
|
|
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"
|