Makefile.rumpkern revision 1.39
11.39Spooka# $NetBSD: Makefile.rumpkern,v 1.39 2009/01/23 13:14:16 pooka Exp $ 21.1Spooka# 31.1Spooka 41.1Spooka.include "${RUMPTOP}/Makefile.rump" 51.1Spooka 61.1SpookaLIB= rump 71.1Spooka 81.1Spooka.PATH: ${RUMPTOP}/librump/rumpkern \ 91.31Spooka ${RUMPTOP}/../kern \ 101.31Spooka ${RUMPTOP}/../conf \ 111.31Spooka ${RUMPTOP}/../dev 121.1Spooka 131.11Spooka# 141.14Spooka# Source modules, first the ones specifically implemented for librump. 151.11Spooka# 161.20SpookaSRCS= rump.c emul.c intr.c locks.c ltsleep.c percpu.c pool.c sleepq.c vm.c 171.20Spooka 181.14Spooka# stubs 191.20Spooka# 201.20SpookaSRCS+= misc_stub.c pmap_stub.c 211.20Spooka 221.20Spooka# autogenerated 231.20Spooka# 241.20SpookaSRCS+= rump_syscalls.c 251.1Spooka 261.11Spooka# 271.11Spooka# Rest are from the std kernel sources. 281.11Spooka# 291.1Spooka# sys/kern 301.27SpookaSRCS+= kern_auth.c kern_descrip.c kern_ksyms.c kern_malloc_stdtype.c \ 311.27Spooka kern_module.c kern_rate.c kern_stub.c kern_sysctl.c \ 321.27Spooka kern_timeout.c kern_uidinfo.c param.c sys_descrip.c \ 331.27Spooka sys_generic.c 341.11Spooka 351.11Spooka# sys/kern subr (misc) 361.23SpookaSRCS+= subr_devsw.c subr_callback.c subr_hash.c subr_iostat.c \ 371.29Spooka subr_kobj.c subr_log.c subr_once.c subr_prf.c \ 381.29Spooka subr_specificdata.c subr_time.c subr_workqueue.c 391.11Spooka 401.20Spooka# the funny bit. this doesn't really belong here, but helps with the 411.20Spooka# needs of kern_descrip.c. And since it's a fully dynamic interface, 421.20Spooka# it doesn't pull in other gunk. 431.20SpookaSRCS+= vnode_if.c 441.1Spooka 451.11Spooka# sys/dev 461.11SpookaSRCS+= clock_subr.c 471.11Spooka 481.39Spooka# Comment these if you want to use malloc(3) directly instead of 491.39Spooka# the kernel allocators. It's a few percent faster, but doesn't 501.39Spooka# emulate all kernel corner cases as well. 511.39SpookaCPPFLAGS+= -DRUMP_USE_REAL_ALLOCATORS 521.39SpookaSRCS+= subr_kmem.c subr_pool.c subr_vmem.c 531.6Spooka 541.1Spooka# no shlib_version because this is automatically in sync with lib/librump 551.1SpookaSHLIB_MAJOR= 0 561.1SpookaSHLIB_MINOR= 0 571.1Spooka 581.25SpookaCPPFLAGS+= -I${RUMPTOP}/librump/rumpkern 591.20SpookaCPPFLAGS+= -I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpvfs 601.1SpookaCFLAGS+= -Wno-pointer-sign 611.32SpookaAFLAGS+= -D_LOCORE -Wa,-fatal-warnings 621.1Spooka 631.27Spooka# 641.27Spooka# If archdir exists, it is required to provide: 651.27Spooka# 1) kobj_reloc() and kobj_machdep() 661.27Spooka# 2) ...? 671.27Spooka# 3) PROFIT! 681.27Spooka# 691.30Spooka 701.30Spooka# 711.34Spooka# Check if we are building compat. In compat mode we need to provide 721.34Spooka# the kernel of our compat target (amd64->i386 & sparc64->sparc), so 731.34Spooka# take MD stuff from the right arch. 741.30Spooka# 751.38She.ifdef LD32DIR 761.30SpookaARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${LD32DIR} 771.31SpookaLIBKERN_ARCH= ${LD32DIR} 781.30Spooka.else 791.24SpookaARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH} 801.30Spooka.endif 811.24Spooka.if exists(${ARCHDIR}) 821.24Spooka.include "${ARCHDIR}/Makefile.inc" 831.24Spooka.PATH: ${ARCHDIR} 841.27Spooka.else 851.27SpookaSRCS+= kobj_stubs.c 861.24Spooka.endif 871.24Spooka 881.31Spooka# include libkern source files 891.31SpookaKERNDIR=${RUMPTOP}/../lib/libkern 901.31Spooka.include "${RUMPTOP}/../lib/libkern/Makefile.libkern" 911.31Spooka 921.36Spooka# Some architectures require a little special massage with atomic 931.36Spooka# compare-and-swap. This is because the kernel version is using 941.36Spooka# instructions or routines unavailable to us in userspace. We 951.36Spooka# use effectively the multiprocessor version of the userspace ops. 961.36Spooka# 971.36Spooka.if ${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "hppa" \ 981.37Spooka || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \ 991.37Spooka || ${MACHINE_CPU} == "vax" 1001.36SpookaCPPFLAGS+= -I${RUMPTOP}/../../common/lib/libc/atomic 1011.36SpookaSRCS+= atomic_cas_generic.c 1021.36Spooka.endif 1031.36Spooka 1041.1Spooka.include <bsd.lib.mk> 1051.1Spooka.include <bsd.klinks.mk> 106