Makefile.rumpkern revision 1.93
11.93Spgoyette# $NetBSD: Makefile.rumpkern,v 1.93 2010/08/21 13:20:43 pgoyette 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.92SpookaSRCS+= compat.c 221.86Spooka 231.86Spooka# Multiprocessor or uniprocessor locking. TODO: select right 241.86Spooka# locking at runtime. 251.87SpookaSRCS+= locks.c 261.87Spooka#SRCS+= locks_up.c 271.20Spooka 281.88Snjolyvers.c: ${RUMPTOP}/../conf/newvers.sh ${RUMPTOP}/../conf/osrelease.sh ${RUMPTOP}/../sys/param.h 291.69Spooka ${_MKMSG_CREATE} vers.c 301.70Spooka ${HOST_SH} ${RUMPTOP}/../conf/newvers.sh -i RUMP-ROAST -n 311.69SpookaSRCS+= vers.c 321.69SpookaCLEANFILES+= vers.c version 331.69Spooka 341.91Spooka# use MI pmap for archs not conforming to kernel ABI 351.91Spooka.ifndef RUMPKMOD 361.62SpookaSRCS+= pmap_stub.c 371.91Spooka.endif 381.20Spooka 391.20Spooka# autogenerated 401.20Spooka# 411.56SpookaSRCS+= rump_syscalls.c rumpkern_if_wrappers.c 421.1Spooka 431.82Spooka# "auto"generated 441.82SpookaSRCS+= devsw.c 451.82Spooka 461.11Spooka# 471.11Spooka# Rest are from the std kernel sources. 481.11Spooka# 491.1Spooka# sys/kern 501.93SpgoyetteSRCS+= init_sysctl_base.c kern_auth.c kern_cfglock.c kern_descrip.c \ 511.93Spgoyette kern_event.c kern_hook.c kern_ksyms.c kern_malloc_stdtype.c \ 521.93Spgoyette kern_module.c kern_mutex_obj.c kern_ntptime.c kern_proc.c \ 531.93Spgoyette kern_rate.c kern_resource.c kern_stub.c kern_syscall.c \ 541.93Spgoyette kern_sysctl.c kern_tc.c kern_timeout.c kern_uidinfo.c param.c \ 551.93Spgoyette sys_descrip.c sys_generic.c sys_module.c sys_pipe.c sys_select.c \ 561.93Spgoyette syscalls.c 571.11Spooka 581.11Spooka# sys/kern subr (misc) 591.73SpookaSRCS+= subr_devsw.c subr_callback.c subr_copy.c subr_device.c \ 601.73Spooka subr_evcnt.c subr_extent.c subr_hash.c subr_humanize.c \ 611.75Spooka subr_iostat.c subr_kobj.c subr_log.c subr_lwp_specificdata.c \ 621.75Spooka subr_once.c subr_prf.c subr_specificdata.c subr_time.c \ 631.75Spooka subr_workqueue.c subr_xcall.c 641.11Spooka 651.55Spooka# sys/uvm 661.55SpookaSRCS+= uvm_readahead.c 671.55Spooka 681.43Spooka# 4.4BSD secmodel. selection is hardcoded for now 691.50SeladSRCS+= secmodel_suser.c 701.43Spooka 711.20Spooka# the funny bit. this doesn't really belong here, but helps with the 721.20Spooka# needs of kern_descrip.c. And since it's a fully dynamic interface, 731.20Spooka# it doesn't pull in other gunk. 741.20SpookaSRCS+= vnode_if.c 751.1Spooka 761.11Spooka# sys/dev 771.11SpookaSRCS+= clock_subr.c 781.11Spooka 791.65Spooka# Flip the comment to the other line if you want to use malloc(3) 801.65Spooka# directly instead of the kernel allocators backed by malloc(3)/mmap(2). 811.65Spooka# Libc malloc is a few percent faster, but doesn't emulate all kernel 821.65Spooka# corner cases as well (not to mention if you want to debug the 831.65Spooka# allocators themselves). 841.65Spooka#CPPFLAGS+= -DRUMP_USE_UNREAL_ALLOCATORS 851.71SpookaSRCS+= subr_kmem.c subr_percpu.c subr_pool.c subr_vmem.c 861.6Spooka 871.1Spooka# no shlib_version because this is automatically in sync with lib/librump 881.1SpookaSHLIB_MAJOR= 0 891.1SpookaSHLIB_MINOR= 0 901.1Spooka 911.47SpookaCPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs 921.47SpookaCPPFLAGS+= -I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpdev 931.32SpookaAFLAGS+= -D_LOCORE -Wa,-fatal-warnings 941.1Spooka 951.27Spooka# 961.27Spooka# If archdir exists, it is required to provide: 971.27Spooka# 1) kobj_reloc() and kobj_machdep() 981.52Spooka# 2) rump_cpu_bootstrap() 991.52Spooka# 3) ...? 1001.52Spooka# 4) PROFIT! 1011.27Spooka# 1021.30Spooka 1031.30Spooka# 1041.34Spooka# Check if we are building compat. In compat mode we need to provide 1051.34Spooka# the kernel of our compat target (amd64->i386 & sparc64->sparc), so 1061.34Spooka# take MD stuff from the right arch. 1071.30Spooka# 1081.67Smrg.ifdef MLIBDIR 1091.67SmrgARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MLIBDIR} 1101.67SmrgLIBKERN_ARCH= ${MLIBDIR} 1111.68Smatt.elif exists(${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU}) 1121.68SmattARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU} 1131.30Spooka.else 1141.24SpookaARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH} 1151.30Spooka.endif 1161.24Spooka.if exists(${ARCHDIR}) 1171.24Spooka.include "${ARCHDIR}/Makefile.inc" 1181.24Spooka.PATH: ${ARCHDIR} 1191.27Spooka.else 1201.52SpookaSRCS+= kobj_stubs.c rumpcpu_generic.c 1211.24Spooka.endif 1221.24Spooka 1231.90Spooka.if ${MACHINE} == "sun3" 1241.90SpookaCPPFLAGS+= -Dsun3 1251.90Spooka.endif 1261.90Spooka 1271.31Spooka# include libkern source files 1281.31SpookaKERNDIR=${RUMPTOP}/../lib/libkern 1291.84Spooka.ifdef RUMPKMOD 1301.84SpookaKERNMISCCPPFLAGS+= -D_RUMPKERNEL 1311.84Spooka.endif 1321.31Spooka.include "${RUMPTOP}/../lib/libkern/Makefile.libkern" 1331.31Spooka 1341.36Spooka# Some architectures require a little special massage with atomic 1351.36Spooka# compare-and-swap. This is because the kernel version is using 1361.36Spooka# instructions or routines unavailable to us in userspace. We 1371.36Spooka# use effectively the multiprocessor version of the userspace ops. 1381.36Spooka# 1391.36Spooka.if ${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "hppa" \ 1401.37Spooka || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \ 1411.54Schristos || ${MACHINE_CPU} == "vax" || ${MACHINE_ARCH} == "m68000" 1421.36SpookaCPPFLAGS+= -I${RUMPTOP}/../../common/lib/libc/atomic 1431.36SpookaSRCS+= atomic_cas_generic.c 1441.36Spooka.endif 1451.36Spooka 1461.1Spooka.include <bsd.lib.mk> 1471.1Spooka.include <bsd.klinks.mk> 148