1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00
freebsd/share/mk/local.init.mk
Simon J. Gerraty 4113aa9077 Move META_MODE bits to local.meta.sys.mk
By moving META_MODE bits from local.sys.mk, they are easier
to skip when MK_META_MODE=no

Update some filters to cope with sync from head.

If buildworld etc or WITHOUT_META_MODE disable all the META_MODE
related options.
2015-05-26 21:44:15 +00:00

39 lines
880 B
Makefile

.include "src.opts.mk"
.if defined(.PARSEDIR)
.if ${.MAKE.MODE:Unormal:Mmeta*} != ""
.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
.endif
.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT)
CFLAGS_LAST+= --sysroot=${SYSROOT}
CXXFLAGS_LAST+= --sysroot=${SYSROOT}
LDADD+= --sysroot=${SYSROOT}
.elif ${MK_STAGING} == "yes"
CFLAGS+= -I${STAGE_INCLUDEDIR}
LDADD+= -L${STAGE_LIBDIR}
.endif
.if ${MACHINE} == "host"
# we cheat?
LDADD+= -B/usr/lib
CFLAGS_LAST+= -I/usr/include
CXXFLAGS_LAST+= -I/usr/include
.endif
.if ${MACHINE} == "host"
.if ${.MAKE.DEPENDFILE:E} != "host"
UPDATE_DEPENDFILE?= no
.endif
HOST_CC?= /usr/bin/cc
HOST_CFLAGS+= -DHOSTPROG
CC= ${HOST_CC}
CFLAGS+= ${HOST_CFLAGS}
.endif