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