xref: /freebsd/tools/build/mk/Makefile.boot (revision 85732ac8)
1# $FreeBSD$
2
3CFLAGS+=	-I${WORLDTMP}/legacy/usr/include
4DPADD+=		${WORLDTMP}/legacy/usr/lib/libegacy.a
5LDADD+=		-legacy
6LDFLAGS+=	-L${WORLDTMP}/legacy/usr/lib
7
8# we do not want to capture dependencies referring to the above
9UPDATE_DEPENDFILE= no
10
11# When building host tools we should never pull in headers from the source sys
12# directory to avoid any ABI issues that might cause the built binary to crash.
13# The only exceptions to this are sys/cddl/compat for dtrace bootstrap tools and
14# sys/crypto for libmd bootstrap.
15# We have to skip this check during make obj since bsd.crunchgen.mk will run
16# make obj on every directory during the build-tools phase.
17.if !make(obj)
18.if !empty(CFLAGS:M*${SRCTOP}/sys)
19.error Do not include $${SRCTOP}/sys when building bootstrap tools. \
20    Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile instead. \
21    Error was caused by Makefile in ${.CURDIR}
22.endif
23
24# ${SRCTOP}/include should also never be used to avoid ABI issues
25.if !empty(CFLAGS:M*${SRCTOP}/include*)
26.error Do not include $${SRCTOP}/include when building bootstrap tools. \
27    Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile instead. \
28    Error was caused by Makefile in ${.CURDIR}
29.endif
30.endif
31