Include src.opts.mk and handle MK_SYSROOT.
This commit is contained in:
parent
88707a7339
commit
ee200e7060
@ -1,4 +1,6 @@
|
||||
|
||||
.include "src.opts.mk"
|
||||
|
||||
.if defined(.PARSEDIR)
|
||||
.if ${.MAKE.MODE:Mmeta*} != ""
|
||||
.if !empty(SUBDIR) && !defined(LIB) && !defined(PROG) && ${.MAKE.MAKEFILES:M*bsd.prog.mk} == ""
|
||||
@ -10,7 +12,22 @@
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT)
|
||||
CFLAGS_LAST+= --sysroot=${SYSROOT}
|
||||
CXXFLAGS_LAST+= --sysroot=${SYSROOT}
|
||||
LDADD+= --sysroot=${SYSROOT}
|
||||
.if ${MACHINE} == "host"
|
||||
# we cheat?
|
||||
LDADD+= -B/usr/lib
|
||||
CFLAGS_LAST+= -I/usr/include
|
||||
CXXFLAGS_LAST+= -I/usr/include
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${MACHINE} == "host"
|
||||
.if ${.MAKE.DEPENDFILE:E} != "host"
|
||||
UPDATE_DEPENDFILE?= no
|
||||
.endif
|
||||
HOST_CC?= /usr/bin/cc
|
||||
HOST_CFLAGS+= -DHOSTPROG
|
||||
CC= ${HOST_CC}
|
||||
|
Loading…
Reference in New Issue
Block a user