Makefile.rumpkern revision 1.32
1#	$NetBSD: Makefile.rumpkern,v 1.32 2009/01/05 14:35:47 pooka Exp $
2#
3
4.include "${RUMPTOP}/Makefile.rump"
5
6LIB=		rump
7LDFLAGS+=	-Wl,--wrap=malloc
8
9.PATH:	${RUMPTOP}/librump/rumpkern				\
10	${RUMPTOP}/../kern					\
11	${RUMPTOP}/../conf					\
12	${RUMPTOP}/../dev
13
14#
15# Source modules, first the ones specifically implemented for librump.
16# 
17SRCS=	rump.c emul.c intr.c locks.c ltsleep.c percpu.c pool.c sleepq.c vm.c
18
19# stubs
20#
21SRCS+=	misc_stub.c pmap_stub.c
22
23# autogenerated
24#
25SRCS+=	rump_syscalls.c
26
27#
28# Rest are from the std kernel sources.
29#
30# sys/kern
31SRCS+=	kern_auth.c kern_descrip.c kern_ksyms.c kern_malloc_stdtype.c	\
32	kern_module.c kern_rate.c kern_stub.c kern_sysctl.c		\
33	kern_timeout.c kern_uidinfo.c param.c sys_descrip.c		\
34	sys_generic.c
35
36# sys/kern subr (misc)
37SRCS+=	subr_devsw.c subr_callback.c subr_hash.c subr_iostat.c		\
38	subr_kobj.c subr_log.c subr_once.c subr_prf.c			\
39	subr_specificdata.c subr_time.c subr_workqueue.c
40
41# the funny bit.  this doesn't really belong here, but helps with the
42# needs of kern_descrip.c.  And since it's a fully dynamic interface,
43# it doesn't pull in other gunk.
44SRCS+=	vnode_if.c
45
46# sys/dev
47SRCS+=	clock_subr.c
48
49# uncomment these lines if you want to use the real kmem code
50#CPPFLAGS+=	-DRUMP_USE_REAL_KMEM
51#SRCS+=		subr_kmem.c subr_vmem.c
52
53.if ${MACHINE_ARCH} == "vax"
54.PATH:	${RUMPTOP}/../lib/libkern/arch/vax
55SRCS+=	blkset.S
56.endif
57
58# no shlib_version because this is automatically in sync with lib/librump
59SHLIB_MAJOR=    0
60SHLIB_MINOR=    0
61
62CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern
63CPPFLAGS+=	-I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpvfs
64CFLAGS+=	-Wno-pointer-sign
65AFLAGS+=	-D_LOCORE -Wa,-fatal-warnings
66
67#
68# If archdir exists, it is required to provide:
69# 1) kobj_reloc() and kobj_machdep()
70# 2) ...?
71# 3) PROFIT!
72#
73
74#
75# XXX: THIS IS UGLY, NEEDS BETTER FIX FOR COMPAT LIB
76#
77.ifdef(LD32DIR)
78ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${LD32DIR}
79LIBKERN_ARCH=	${LD32DIR}
80.else
81ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH}
82.endif
83.if exists(${ARCHDIR})
84.include "${ARCHDIR}/Makefile.inc"
85.PATH:	${ARCHDIR}
86.else
87SRCS+=	kobj_stubs.c
88.endif
89
90# include libkern source files
91KERNDIR=${RUMPTOP}/../lib/libkern
92.include "${RUMPTOP}/../lib/libkern/Makefile.libkern"
93
94.include <bsd.lib.mk>
95.include <bsd.klinks.mk>
96