-.if (${NBSD_LIBC} != "no")
+.if ${COMPILER_TYPE} == "gnu"
CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix
-DEPEND+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
+DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
.else
CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
.endif
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
.endif
BINDIR?= /sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
debug= 0
CPPFLAGS+= -Ddebug=${debug} -w
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
debug= 0
CPPFLAGS+= -Ddebug=$(debug)
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
CPPFLAGS+= -DDEBUG=1 -DDEBUG2=0
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
CPPFLAGS.orinoco.c+= -I${MINIXSRCDIR}
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
strip $(PROGRAMS)
.endif
-.include <bsd.prog.mk>
+.include <minix.service.mk>
CPPFLAGS.random.c+= -I${MINIXSRCDIR}
-.include <bsd.prog.mk>
+.include <minix.service.mk>
CPPFLAGS+= -D_SYSTEM=1
-.include <bsd.prog.mk>
+.include <minix.service.mk>
CPPFLAGS+= -I${MINIXSRCDIR}
-.include <bsd.prog.mk>
+.include <minix.service.mk>
CPPFLAGS+= -I${MINIXSRCDIR}
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
LDFLAGS+= -.o
.elif ${COMPILER_TYPE} == "gnu"
CFLAGS+=-march=i386
-CPPFLAGS+= -ffreestanding -fno-stack-protector
+CPPFLAGS+= -ffreestanding -fno-stack-protector -D_NETBSD_SOURCE
LDFLAGS+= -T ${.CURDIR}/arch/${ARCH}/kernel.lds
LDFLAGS+= -nostdlib -L${LIBDIR}
-.endif
-
-.if (${NBSD_LIBC} != "no")
LDADD+= -lminlib
DPADD+= ${LIBMINLIB}
-CPPFLAGS+= -D_NETBSD_SOURCE
-.else
-
.if ${CC} == "gcc"
-DPADD+= ${LIBC}
-LDADD+= -lgcc -lc -lgcc
+LDADD+= -lgcc -lsys -lgcc
.elif ${CC} == "clang"
+LDADD+= -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
DPADD+= ${LIBC}
-LDADD+= -L/usr/pkg/lib
-LDADD+= -lCompilerRT-Generic -lc -lCompilerRT-Generic
.endif
-
.endif
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${ARCH}/include -I${MINIXSRCDIR}
void *alloca(int); /* built-in for gcc */
#elif defined(__PCC__) && !defined(__GNUC__)
#define alloca(size) __builtin_alloca(size)
+#elif (__GNUC__ >= 2)
+#define alloca(size) __builtin_alloca(size)
#else
void *alloca(size_t);
#endif /* __GNUC__ */
-.if (${NBSD_LIBC} != "no")
+.if ${COMPILER_TYPE} == "gnu"
CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
INSTALLFLAGS+= -S 128k
MAN=
-.include <bsd.prog.mk>
+.include <minix.service.mk>
DEFAULT_NR_BUFS= 1024
CPPFLAGS+= -DDEFAULT_NR_BUFS=${DEFAULT_NR_BUFS}
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
CPPFLAGS+= -I${.CURDIR} -D_MINIX
-.include <bsd.prog.mk>
+.include <minix.service.mk>
# Makefile for the init program (INIT)
+.include <bsd.own.mk>
+
PROG= init
SRCS= init.c
BINDIR?= /usr/sbin
INSTALLFLAGS+= -S 64k
-.include <minix.bootprog.mk>
+.if ${OBJECT_FMT} == "ELF"
+LDFLAGS+= -Wl,--section-start=.init=0x0
+.endif
+
+.include <bsd.prog.mk>
BINDIR?= /usr/sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
CPPFLAGS.dmp_rs.c+= -I${MINIXSRCDIR}
CPPFLAGS.dmp_vm.c+= -I${MINIXSRCDIR}
-.include <bsd.prog.mk>
+.include <minix.service.mk>
NR_BUFS= 100
CPPFLAGS+= -DNR_BUFS=${NR_BUFS}
-.include <bsd.prog.mk>
+.include <minix.service.mk>
CFLAGS += -Wextra -std=c99
-.include <bsd.prog.mk>
+.include <minix.service.mk>
BINDIR?= /sbin
-.include <bsd.prog.mk>
+.include <minix.service.mk>
pkgsrchooks.mk sys.mk
# MINIX-specific files
-FILES+= minix.bootprog.mk
+FILES+= minix.bootprog.mk minix.service.mk
FILESDIR=/usr/share/mk
.endif
_LDFLAGS.${_P}= ${LDFLAGS} ${LDFLAGS.${_P}}
_LDSTATIC.${_P}= ${LDSTATIC} ${LDSTATIC.${_P}}
-.if defined(NBSD_LIBC) && (${NBSD_LIBC} == "yes") && \
- !empty(_LDADD.${_P}:M-lsys)
-# defined(USE_LIBSYS) && (${USE_LIBSYS} == "yes")
-_LDADD.${_P}+= -nodefaultlibs -lgcc -lsys -lgcc
-.endif
-
##### Build and install rules
.if !empty(_APPEND_SRCS:M[Yy][Ee][Ss])
SRCS+= ${SRCS.${_P}} # For bsd.dep.mk
LDFLAGS+= -Wl,--section-start=.init=0x0
.endif
-.include <bsd.prog.mk>
+.include <minix.service.mk>
--- /dev/null
+# MINIX-specific servers/drivers options
+.include <bsd.own.mk>
+
+.if ${COMPILER_TYPE} == "gnu"
+
+.if ${CC} == "gcc"
+LDADD+= -nodefaultlibs -lgcc -lsys -lgcc
+.elif ${CC} == "clang"
+LDADD+= -nodefaultlibs -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
+.endif
+
+.endif
+
+.include <bsd.prog.mk>