c0c8d25799
Makes things easier for pkgsrc
48 lines
1.2 KiB
Makefile
48 lines
1.2 KiB
Makefile
# Makefile for kernel
|
|
.include <bsd.own.mk>
|
|
|
|
PROG= kernel
|
|
|
|
# first-stage, arch-dependent startup code
|
|
SRCS= mpx.S
|
|
SRCS+= start.c table.c main.c proc.c \
|
|
system.c clock.c utility.c debug.c profile.c interrupt.c \
|
|
watchdog.c
|
|
|
|
DPADD+= ${LIBTIMERS} ${LIBSYS}
|
|
LDADD+= -ltimers -lsys
|
|
|
|
.if ${COMPILER_TYPE} == "ack"
|
|
LDFLAGS+= -.o
|
|
.elif ${COMPILER_TYPE} == "gnu"
|
|
CPPFLAGS+= -fno-builtin -ffreestanding -fno-stack-protector
|
|
LDFLAGS+= -T arch/${ARCH}/kernel.lds
|
|
LDFLAGS+= -nostdlib
|
|
DPADD+= ${LIBC}
|
|
LDADD+= -lc
|
|
.endif
|
|
|
|
CPPFLAGS+= -I${.CURDIR}/arch/${ARCH}/include -I${MINIXSRCDIR}
|
|
AFLAGS+= -I${.CURDIR}/arch/${ARCH}/include -I${MINIXSRCDIR}
|
|
|
|
INSTALLFLAGS+= -S 0
|
|
BINDIR= /usr/sbin
|
|
MAN=
|
|
|
|
.include "system/Makefile.inc"
|
|
.include "arch/${ARCH}/Makefile.inc"
|
|
.include <bsd.prog.mk>
|
|
|
|
debug.d: extracted-errno.h extracted-mfield.h extracted-mtype.h
|
|
|
|
extracted-errno.h: extract-errno.sh ../include/errno.h
|
|
sh extract-errno.sh > extracted-errno.h
|
|
|
|
extracted-mfield.h: extract-mfield.sh ../lib/libc/other/*.c ../lib/libc/posix/*.c ../lib/libsys/*.c
|
|
sh extract-mfield.sh > extracted-mfield.h
|
|
|
|
extracted-mtype.h: extract-mtype.sh ../include/minix/com.h
|
|
sh extract-mtype.sh > extracted-mtype.h
|
|
|
|
clean:
|
|
rm -f extracted-errno.h extracted-mfield.h extracted-mtype.h
|