LDADD+= -lminlib
DPADD+= ${LIBMINLIB}
.if ${CC} == "gcc"
-LDADD+= -lgcc -lsys -lgcc
+LDADD+= -lgcc -lsys -lgcc -lminc
.elif ${CC} == "clang"
-LDADD+= -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
+LDADD+= -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc
DPADD+= ${LIBC}
.endif
.endif
libddekit
.if defined(NBSD_LIBC) && (${NBSD_LIBC} != "no")
-SUBDIR+= libelf
+SUBDIR+= libelf libminc
.endif
.if ${COMPILER_TYPE} == "ack"
# Minimal libc for servers and drivers.
#
+.include <bsd.own.mk>
+
+LIB= minc
+
+CPPFLAGS.sched_start.c+= -I${MINIXSRCDIR}
+
LIBCSRCDIR=${MINIXSRCDIR}/lib/nbsd_libc
-.if (${NBSD_LIBC} != "no")
MACHINE_ARCH=${MACHINE}
#
CPPFLAGS+= -D_LIBSYS
-.endif
+.include <bsd.lib.mk>
CPPFLAGS.sched_start.c+= -I${MINIXSRCDIR}
-.if (${NBSD_LIBC} != "no")
-.include "Makefile.libc.inc"
+.if (${CC} == "gcc") || (${CC} == "clang")
+LDADD+= -lminc
.endif
.include <bsd.lib.mk>
.if ${COMPILER_TYPE} == "gnu"
.if ${CC} == "gcc"
-LDADD+= -nodefaultlibs -lgcc -lsys -lgcc
+LDADD+= -nodefaultlibs -lgcc -lsys -lgcc -lminc
.elif ${CC} == "clang"
-LDADD+= -nodefaultlibs -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
+LDADD+= -nodefaultlibs -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc
.endif
.endif