6 .
include "arch/${MACHINE_ARCH}/Makefile.inc"
8 SRCS
+= clock.c cpulocals.c interrupt.c main.c proc.c system.c \
9 table.c utility.c usermapped_data.c
11 LINKERSCRIPT
=${.CURDIR
}/arch
/${MACHINE_ARCH}/kernel.lds
13 DPADD
+= ${LIBTIMERS} ${LIBSYS} ${LIBEXEC} ${LINKERSCRIPT}
14 LDADD
+= -ltimers
-lsys
-lexec
16 CFLAGS
+= -D__kernel__
18 CPPFLAGS
+= -fno-stack-protector
-D_NETBSD_SOURCE
-D_MINIX
19 LDFLAGS
+= -T
${LINKERSCRIPT}
20 LDFLAGS
+= -nostdlib
-L
${DESTDIR}/${LIBDIR}
24 LDADD
+= -lgcc
-lsys
-lgcc
-lminc
25 .elif
!empty
(CC
:M
*clang
)
26 LDADD
+= -L
/usr
/pkg
/compiler-rt
/lib
-lCompilerRT-Generic
-lsys
-lCompilerRT-Generic
-lminc
30 CPPFLAGS
+= -I
${.CURDIR
} -I
${.CURDIR
}/arch
/${MACHINE_ARCH}/include -I
${NETBSDSRCDIR}
35 .
include "system/Makefile.inc"
41 .if
${USE_WATCHDOG} != "no"
43 CPPFLAGS
+= -DUSE_WATCHDOG
46 .if
${USE_MCONTEXT} != "no"
48 CPPFLAGS
+= -DUSE_MCONTEXT
51 # Extra debugging routines
52 .if
${USE_SYSDEBUG} != "no"
54 CPPFLAGS
+= -DUSE_SYSDEBUG
57 # These come last, so the profiling buffer is at the end of the data segment
58 SRCS
+= profile.c do_sprofile.c
60 .if
${USE_LIVEUPDATE} != "no"
61 CPPFLAGS
+= -DUSE_UPDATE
64 .if
${USE_STATECTL} != "no"
65 CPPFLAGS
+= -DUSE_STATECTL
68 .if
${USE_TRACE} != "no"
69 CPPFLAGS
+= -DUSE_TRACE
72 .
include <bsd.prog.mk
>
74 debug.d
: extracted-errno.h extracted-mfield.h extracted-mtype.h
76 CLEANFILES
+=extracted-errno.h extracted-mfield.h extracted-mtype.h procoffsets.h
78 extracted-errno.h
: extract-errno.sh ..
/include/errno.h
80 cd
${.CURDIR
} ; ${HOST_SH} extract-errno.sh
> ${.OBJDIR
}/extracted-errno.h
82 extracted-mfield.h
: extract-mfield.sh ..
/lib
/libc
/sys-minix
/*.c ..
/lib
/libsys
/*.c
84 cd
${.CURDIR
} ; ${HOST_SH} extract-mfield.sh
> ${.OBJDIR
}/extracted-mfield.h
86 extracted-mtype.h
: extract-mtype.sh ..
/include/minix
/com.h
88 cd
${.CURDIR
} ; ${HOST_SH} extract-mtype.sh
> ${.OBJDIR
}/extracted-mtype.h
91 rm -f extracted-errno.h extracted-mfield.h extracted-mtype.h