1 1.37 pooka # $NetBSD: Makefile.rumpkern,v 1.37 2009/01/14 23:22:09 pooka Exp $ 2 1.1 pooka # 3 1.1 pooka 4 1.1 pooka .include "${RUMPTOP}/Makefile.rump" 5 1.1 pooka 6 1.1 pooka LIB= rump 7 1.1 pooka 8 1.1 pooka .PATH: ${RUMPTOP}/librump/rumpkern \ 9 1.31 pooka ${RUMPTOP}/../kern \ 10 1.31 pooka ${RUMPTOP}/../conf \ 11 1.31 pooka ${RUMPTOP}/../dev 12 1.1 pooka 13 1.11 pooka # 14 1.14 pooka # Source modules, first the ones specifically implemented for librump. 15 1.11 pooka # 16 1.20 pooka SRCS= rump.c emul.c intr.c locks.c ltsleep.c percpu.c pool.c sleepq.c vm.c 17 1.20 pooka 18 1.14 pooka # stubs 19 1.20 pooka # 20 1.20 pooka SRCS+= misc_stub.c pmap_stub.c 21 1.20 pooka 22 1.20 pooka # autogenerated 23 1.20 pooka # 24 1.20 pooka SRCS+= rump_syscalls.c 25 1.1 pooka 26 1.11 pooka # 27 1.11 pooka # Rest are from the std kernel sources. 28 1.11 pooka # 29 1.1 pooka # sys/kern 30 1.27 pooka SRCS+= kern_auth.c kern_descrip.c kern_ksyms.c kern_malloc_stdtype.c \ 31 1.27 pooka kern_module.c kern_rate.c kern_stub.c kern_sysctl.c \ 32 1.27 pooka kern_timeout.c kern_uidinfo.c param.c sys_descrip.c \ 33 1.27 pooka sys_generic.c 34 1.11 pooka 35 1.11 pooka # sys/kern subr (misc) 36 1.23 pooka SRCS+= subr_devsw.c subr_callback.c subr_hash.c subr_iostat.c \ 37 1.29 pooka subr_kobj.c subr_log.c subr_once.c subr_prf.c \ 38 1.29 pooka subr_specificdata.c subr_time.c subr_workqueue.c 39 1.11 pooka 40 1.20 pooka # the funny bit. this doesn't really belong here, but helps with the 41 1.20 pooka # needs of kern_descrip.c. And since it's a fully dynamic interface, 42 1.20 pooka # it doesn't pull in other gunk. 43 1.20 pooka SRCS+= vnode_if.c 44 1.1 pooka 45 1.11 pooka # sys/dev 46 1.11 pooka SRCS+= clock_subr.c 47 1.11 pooka 48 1.6 pooka # uncomment these lines if you want to use the real kmem code 49 1.6 pooka #CPPFLAGS+= -DRUMP_USE_REAL_KMEM 50 1.14 pooka #SRCS+= subr_kmem.c subr_vmem.c 51 1.6 pooka 52 1.1 pooka # no shlib_version because this is automatically in sync with lib/librump 53 1.1 pooka SHLIB_MAJOR= 0 54 1.1 pooka SHLIB_MINOR= 0 55 1.1 pooka 56 1.25 pooka CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern 57 1.20 pooka CPPFLAGS+= -I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpvfs 58 1.1 pooka CFLAGS+= -Wno-pointer-sign 59 1.32 pooka AFLAGS+= -D_LOCORE -Wa,-fatal-warnings 60 1.1 pooka 61 1.27 pooka # 62 1.27 pooka # If archdir exists, it is required to provide: 63 1.27 pooka # 1) kobj_reloc() and kobj_machdep() 64 1.27 pooka # 2) ...? 65 1.27 pooka # 3) PROFIT! 66 1.27 pooka # 67 1.30 pooka 68 1.30 pooka # 69 1.34 pooka # Check if we are building compat. In compat mode we need to provide 70 1.34 pooka # the kernel of our compat target (amd64->i386 & sparc64->sparc), so 71 1.34 pooka # take MD stuff from the right arch. 72 1.30 pooka # 73 1.30 pooka .ifdef(LD32DIR) 74 1.30 pooka ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${LD32DIR} 75 1.31 pooka LIBKERN_ARCH= ${LD32DIR} 76 1.30 pooka .else 77 1.24 pooka ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH} 78 1.30 pooka .endif 79 1.24 pooka .if exists(${ARCHDIR}) 80 1.24 pooka .include "${ARCHDIR}/Makefile.inc" 81 1.24 pooka .PATH: ${ARCHDIR} 82 1.27 pooka .else 83 1.27 pooka SRCS+= kobj_stubs.c 84 1.24 pooka .endif 85 1.24 pooka 86 1.31 pooka # include libkern source files 87 1.31 pooka KERNDIR=${RUMPTOP}/../lib/libkern 88 1.31 pooka .include "${RUMPTOP}/../lib/libkern/Makefile.libkern" 89 1.31 pooka 90 1.36 pooka # Some architectures require a little special massage with atomic 91 1.36 pooka # compare-and-swap. This is because the kernel version is using 92 1.36 pooka # instructions or routines unavailable to us in userspace. We 93 1.36 pooka # use effectively the multiprocessor version of the userspace ops. 94 1.36 pooka # 95 1.36 pooka .if ${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "hppa" \ 96 1.37 pooka || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \ 97 1.37 pooka || ${MACHINE_CPU} == "vax" 98 1.36 pooka CPPFLAGS+= -I${RUMPTOP}/../../common/lib/libc/atomic 99 1.36 pooka SRCS+= atomic_cas_generic.c 100 1.36 pooka .endif 101 1.36 pooka 102 1.1 pooka .include <bsd.lib.mk> 103 1.1 pooka .include <bsd.klinks.mk> 104