aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/Makefile')
-rw-r--r--lib/libc/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 34dac5255432..6f88dac8254a 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -159,6 +159,24 @@ libkern.${LIBC_ARCH}:: ${KMSRCS}
.include <bsd.lib.mk>
+.if !defined(_SKIP_BUILD)
+# We need libutil.h, get it directly to avoid
+# recording a build dependency
+CFLAGS+= -I${.CURDIR:H}/libutil
+# Same issue with libm
+MSUN_ARCH_SUBDIR != ${MAKE} -B -C ${.CURDIR:H}/msun -V ARCH_SUBDIR
+# unfortunately msun/src contains both private and public headers
+CFLAGS+= -I${.CURDIR:H}/msun/${MSUN_ARCH_SUBDIR}
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+CFLAGS+= -I${.CURDIR:H}/msun/x86
+.endif
+CFLAGS+= -I${.CURDIR:H}/msun/src
+# and we do not want to record a dependency on msun
+.if ${.MAKE.LEVEL} > 0
+GENDIRDEPS_FILTER+= N${RELDIR:H}/msun
+.endif
+.endif
+
# Disable warnings in contributed sources.
CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/}
# XXX For now, we don't allow libc to be compiled with