1 1.62 pooka # $NetBSD: Makefile.rumpkern,v 1.62 2009/11/04 19:21:51 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.55 pooka ${RUMPTOP}/../uvm \ 11 1.31 pooka ${RUMPTOP}/../conf \ 12 1.43 pooka ${RUMPTOP}/../dev \ 13 1.50 elad ${RUMPTOP}/../secmodel/suser 14 1.1 pooka 15 1.11 pooka # 16 1.14 pooka # Source modules, first the ones specifically implemented for librump. 17 1.11 pooka # 18 1.59 pooka SRCS= rump.c rumpcopy.c emul.c intr.c locks.c ltsleep.c \ 19 1.60 pooka memalloc.c percpu.c scheduler.c sleepq.c \ 20 1.61 pooka sysproxy_socket.c threads.c vm.c 21 1.20 pooka 22 1.14 pooka # stubs 23 1.20 pooka # 24 1.62 pooka SRCS+= pmap_stub.c 25 1.20 pooka 26 1.20 pooka # autogenerated 27 1.20 pooka # 28 1.56 pooka SRCS+= rump_syscalls.c rumpkern_if_wrappers.c 29 1.1 pooka 30 1.11 pooka # 31 1.11 pooka # Rest are from the std kernel sources. 32 1.11 pooka # 33 1.1 pooka # sys/kern 34 1.48 pooka SRCS+= init_sysctl_base.c kern_auth.c kern_descrip.c kern_event.c \ 35 1.57 pooka kern_ksyms.c kern_malloc_stdtype.c kern_module.c \ 36 1.57 pooka kern_mutex_obj.c kern_rate.c kern_stub.c kern_sysctl.c \ 37 1.57 pooka kern_timeout.c kern_uidinfo.c param.c \ 38 1.53 pooka sys_descrip.c sys_generic.c sys_select.c syscalls.c 39 1.11 pooka 40 1.11 pooka # sys/kern subr (misc) 41 1.58 pooka SRCS+= subr_devsw.c subr_callback.c subr_copy.c subr_evcnt.c \ 42 1.58 pooka subr_extent.c subr_hash.c subr_humanize.c subr_iostat.c \ 43 1.58 pooka subr_kobj.c subr_log.c subr_once.c subr_prf.c \ 44 1.58 pooka subr_specificdata.c subr_time.c subr_workqueue.c 45 1.11 pooka 46 1.55 pooka # sys/uvm 47 1.55 pooka SRCS+= uvm_readahead.c 48 1.55 pooka 49 1.43 pooka # 4.4BSD secmodel. selection is hardcoded for now 50 1.50 elad SRCS+= secmodel_suser.c 51 1.43 pooka 52 1.20 pooka # the funny bit. this doesn't really belong here, but helps with the 53 1.20 pooka # needs of kern_descrip.c. And since it's a fully dynamic interface, 54 1.20 pooka # it doesn't pull in other gunk. 55 1.20 pooka SRCS+= vnode_if.c 56 1.1 pooka 57 1.11 pooka # sys/dev 58 1.11 pooka SRCS+= clock_subr.c 59 1.11 pooka 60 1.39 pooka # Comment these if you want to use malloc(3) directly instead of 61 1.39 pooka # the kernel allocators. It's a few percent faster, but doesn't 62 1.39 pooka # emulate all kernel corner cases as well. 63 1.40 pooka #CPPFLAGS+= -DRUMP_USE_REAL_ALLOCATORS 64 1.40 pooka #SRCS+= subr_kmem.c subr_pool.c subr_vmem.c 65 1.6 pooka 66 1.1 pooka # no shlib_version because this is automatically in sync with lib/librump 67 1.1 pooka SHLIB_MAJOR= 0 68 1.1 pooka SHLIB_MINOR= 0 69 1.1 pooka 70 1.47 pooka CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs 71 1.47 pooka CPPFLAGS+= -I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpdev 72 1.1 pooka CFLAGS+= -Wno-pointer-sign 73 1.32 pooka AFLAGS+= -D_LOCORE -Wa,-fatal-warnings 74 1.1 pooka 75 1.27 pooka # 76 1.27 pooka # If archdir exists, it is required to provide: 77 1.27 pooka # 1) kobj_reloc() and kobj_machdep() 78 1.52 pooka # 2) rump_cpu_bootstrap() 79 1.52 pooka # 3) ...? 80 1.52 pooka # 4) PROFIT! 81 1.27 pooka # 82 1.30 pooka 83 1.30 pooka # 84 1.34 pooka # Check if we are building compat. In compat mode we need to provide 85 1.34 pooka # the kernel of our compat target (amd64->i386 & sparc64->sparc), so 86 1.34 pooka # take MD stuff from the right arch. 87 1.30 pooka # 88 1.38 he .ifdef LD32DIR 89 1.30 pooka ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${LD32DIR} 90 1.31 pooka LIBKERN_ARCH= ${LD32DIR} 91 1.30 pooka .else 92 1.24 pooka ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH} 93 1.30 pooka .endif 94 1.24 pooka .if exists(${ARCHDIR}) 95 1.24 pooka .include "${ARCHDIR}/Makefile.inc" 96 1.24 pooka .PATH: ${ARCHDIR} 97 1.27 pooka .else 98 1.52 pooka SRCS+= kobj_stubs.c rumpcpu_generic.c 99 1.24 pooka .endif 100 1.24 pooka 101 1.31 pooka # include libkern source files 102 1.31 pooka KERNDIR=${RUMPTOP}/../lib/libkern 103 1.31 pooka .include "${RUMPTOP}/../lib/libkern/Makefile.libkern" 104 1.31 pooka 105 1.36 pooka # Some architectures require a little special massage with atomic 106 1.36 pooka # compare-and-swap. This is because the kernel version is using 107 1.36 pooka # instructions or routines unavailable to us in userspace. We 108 1.36 pooka # use effectively the multiprocessor version of the userspace ops. 109 1.36 pooka # 110 1.36 pooka .if ${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "hppa" \ 111 1.37 pooka || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \ 112 1.54 christos || ${MACHINE_CPU} == "vax" || ${MACHINE_ARCH} == "m68000" 113 1.36 pooka CPPFLAGS+= -I${RUMPTOP}/../../common/lib/libc/atomic 114 1.36 pooka SRCS+= atomic_cas_generic.c 115 1.36 pooka .endif 116 1.36 pooka 117 1.1 pooka .include <bsd.lib.mk> 118 1.1 pooka .include <bsd.klinks.mk> 119