Makefile.rumpkern revision 1.91
11.91Spooka# $NetBSD: Makefile.rumpkern,v 1.91 2010/06/16 11:45:21 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.55Spooka ${RUMPTOP}/../uvm \ 111.31Spooka ${RUMPTOP}/../conf \ 121.43Spooka ${RUMPTOP}/../dev \ 131.50Selad ${RUMPTOP}/../secmodel/suser 141.1Spooka 151.11Spooka# 161.14Spooka# Source modules, first the ones specifically implemented for librump. 171.11Spooka# 181.85SpookaSRCS= rump.c rumpcopy.c emul.c intr.c klock.c kobj_rename.c \ 191.86Spooka ltsleep.c memalloc.c scheduler.c signals.c sleepq.c \ 201.86Spooka sysproxy_socket.c threads.c vm.c 211.86Spooka 221.86Spooka# Multiprocessor or uniprocessor locking. TODO: select right 231.86Spooka# locking at runtime. 241.87SpookaSRCS+= locks.c 251.87Spooka#SRCS+= locks_up.c 261.20Spooka 271.88Snjolyvers.c: ${RUMPTOP}/../conf/newvers.sh ${RUMPTOP}/../conf/osrelease.sh ${RUMPTOP}/../sys/param.h 281.69Spooka ${_MKMSG_CREATE} vers.c 291.70Spooka ${HOST_SH} ${RUMPTOP}/../conf/newvers.sh -i RUMP-ROAST -n 301.69SpookaSRCS+= vers.c 311.69SpookaCLEANFILES+= vers.c version 321.69Spooka 331.91Spooka# use MI pmap for archs not conforming to kernel ABI 341.91Spooka.ifndef RUMPKMOD 351.62SpookaSRCS+= pmap_stub.c 361.91Spooka.endif 371.20Spooka 381.20Spooka# autogenerated 391.20Spooka# 401.56SpookaSRCS+= rump_syscalls.c rumpkern_if_wrappers.c 411.1Spooka 421.82Spooka# "auto"generated 431.82SpookaSRCS+= devsw.c 441.82Spooka 451.11Spooka# 461.11Spooka# Rest are from the std kernel sources. 471.11Spooka# 481.1Spooka# sys/kern 491.48SpookaSRCS+= init_sysctl_base.c kern_auth.c kern_descrip.c kern_event.c \ 501.72Spooka kern_hook.c kern_ksyms.c kern_malloc_stdtype.c kern_module.c \ 511.89Spooka kern_mutex_obj.c kern_ntptime.c kern_proc.c kern_rate.c \ 521.89Spooka kern_resource.c kern_stub.c kern_syscall.c kern_sysctl.c \ 531.89Spooka kern_tc.c kern_timeout.c kern_uidinfo.c param.c sys_descrip.c \ 541.80Spooka sys_generic.c sys_module.c sys_pipe.c sys_select.c syscalls.c 551.11Spooka 561.11Spooka# sys/kern subr (misc) 571.73SpookaSRCS+= subr_devsw.c subr_callback.c subr_copy.c subr_device.c \ 581.73Spooka subr_evcnt.c subr_extent.c subr_hash.c subr_humanize.c \ 591.75Spooka subr_iostat.c subr_kobj.c subr_log.c subr_lwp_specificdata.c \ 601.75Spooka subr_once.c subr_prf.c subr_specificdata.c subr_time.c \ 611.75Spooka subr_workqueue.c subr_xcall.c 621.11Spooka 631.55Spooka# sys/uvm 641.55SpookaSRCS+= uvm_readahead.c 651.55Spooka 661.43Spooka# 4.4BSD secmodel. selection is hardcoded for now 671.50SeladSRCS+= secmodel_suser.c 681.43Spooka 691.20Spooka# the funny bit. this doesn't really belong here, but helps with the 701.20Spooka# needs of kern_descrip.c. And since it's a fully dynamic interface, 711.20Spooka# it doesn't pull in other gunk. 721.20SpookaSRCS+= vnode_if.c 731.1Spooka 741.11Spooka# sys/dev 751.11SpookaSRCS+= clock_subr.c 761.11Spooka 771.65Spooka# Flip the comment to the other line if you want to use malloc(3) 781.65Spooka# directly instead of the kernel allocators backed by malloc(3)/mmap(2). 791.65Spooka# Libc malloc is a few percent faster, but doesn't emulate all kernel 801.65Spooka# corner cases as well (not to mention if you want to debug the 811.65Spooka# allocators themselves). 821.65Spooka#CPPFLAGS+= -DRUMP_USE_UNREAL_ALLOCATORS 831.71SpookaSRCS+= subr_kmem.c subr_percpu.c subr_pool.c subr_vmem.c 841.6Spooka 851.1Spooka# no shlib_version because this is automatically in sync with lib/librump 861.1SpookaSHLIB_MAJOR= 0 871.1SpookaSHLIB_MINOR= 0 881.1Spooka 891.47SpookaCPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs 901.47SpookaCPPFLAGS+= -I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpdev 911.32SpookaAFLAGS+= -D_LOCORE -Wa,-fatal-warnings 921.1Spooka 931.27Spooka# 941.27Spooka# If archdir exists, it is required to provide: 951.27Spooka# 1) kobj_reloc() and kobj_machdep() 961.52Spooka# 2) rump_cpu_bootstrap() 971.52Spooka# 3) ...? 981.52Spooka# 4) PROFIT! 991.27Spooka# 1001.30Spooka 1011.30Spooka# 1021.34Spooka# Check if we are building compat. In compat mode we need to provide 1031.34Spooka# the kernel of our compat target (amd64->i386 & sparc64->sparc), so 1041.34Spooka# take MD stuff from the right arch. 1051.30Spooka# 1061.67Smrg.ifdef MLIBDIR 1071.67SmrgARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MLIBDIR} 1081.67SmrgLIBKERN_ARCH= ${MLIBDIR} 1091.68Smatt.elif exists(${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU}) 1101.68SmattARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU} 1111.30Spooka.else 1121.24SpookaARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH} 1131.30Spooka.endif 1141.24Spooka.if exists(${ARCHDIR}) 1151.24Spooka.include "${ARCHDIR}/Makefile.inc" 1161.24Spooka.PATH: ${ARCHDIR} 1171.27Spooka.else 1181.52SpookaSRCS+= kobj_stubs.c rumpcpu_generic.c 1191.24Spooka.endif 1201.24Spooka 1211.90Spooka.if ${MACHINE} == "sun3" 1221.90SpookaCPPFLAGS+= -Dsun3 1231.90Spooka.endif 1241.90Spooka 1251.31Spooka# include libkern source files 1261.31SpookaKERNDIR=${RUMPTOP}/../lib/libkern 1271.84Spooka.ifdef RUMPKMOD 1281.84SpookaKERNMISCCPPFLAGS+= -D_RUMPKERNEL 1291.84Spooka.endif 1301.31Spooka.include "${RUMPTOP}/../lib/libkern/Makefile.libkern" 1311.31Spooka 1321.36Spooka# Some architectures require a little special massage with atomic 1331.36Spooka# compare-and-swap. This is because the kernel version is using 1341.36Spooka# instructions or routines unavailable to us in userspace. We 1351.36Spooka# use effectively the multiprocessor version of the userspace ops. 1361.36Spooka# 1371.36Spooka.if ${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "hppa" \ 1381.37Spooka || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \ 1391.54Schristos || ${MACHINE_CPU} == "vax" || ${MACHINE_ARCH} == "m68000" 1401.36SpookaCPPFLAGS+= -I${RUMPTOP}/../../common/lib/libc/atomic 1411.36SpookaSRCS+= atomic_cas_generic.c 1421.36Spooka.endif 1431.36Spooka 1441.1Spooka.include <bsd.lib.mk> 1451.1Spooka.include <bsd.klinks.mk> 146