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