Home | History | Annotate | Line # | Download | only in rumpkern
Makefile.rumpkern revision 1.110.2.7
      1  1.110.2.7   yamt #	$NetBSD: Makefile.rumpkern,v 1.110.2.7 2014/05/22 11:41:15 yamt Exp $
      2        1.1  pooka #
      3        1.1  pooka 
      4        1.1  pooka .include "${RUMPTOP}/Makefile.rump"
      5        1.1  pooka 
      6      1.108  joerg .include <bsd.own.mk>
      7      1.108  joerg 
      8        1.1  pooka LIB=		rump
      9        1.1  pooka 
     10        1.1  pooka .PATH:	${RUMPTOP}/librump/rumpkern				\
     11  1.110.2.7   yamt 	${RUMPTOP}/librump/rumpkern/arch/generic		\
     12       1.31  pooka 	${RUMPTOP}/../kern					\
     13       1.55  pooka 	${RUMPTOP}/../uvm					\
     14       1.31  pooka 	${RUMPTOP}/../conf					\
     15       1.43  pooka 	${RUMPTOP}/../dev					\
     16  1.110.2.7   yamt 	${RUMPTOP}/../crypto/nist_ctr_drbg			\
     17  1.110.2.7   yamt 	${RUMPTOP}/../crypto/rijndael				\
     18  1.110.2.2   yamt 	${RUMPTOP}/../secmodel					\
     19      1.107  pooka 	${RUMPTOP}/../secmodel/suser				\
     20      1.107  pooka 	${RUMPTOP}/../compat/common
     21        1.1  pooka 
     22       1.11  pooka #
     23       1.14  pooka # Source modules, first the ones specifically implemented for librump.
     24       1.11  pooka # 
     25  1.110.2.7   yamt SRCS+=	rump.c rumpcopy.c cons.c emul.c etfs_wrap.c intr.c	\
     26  1.110.2.7   yamt 	lwproc.c klock.c kobj_rename.c ltsleep.c scheduler.c	\
     27  1.110.2.7   yamt 	signals.c sleepq.c threads.c vm.c hyperentropy.c	\
     28  1.110.2.7   yamt 	accessors.c
     29  1.110.2.7   yamt 
     30  1.110.2.7   yamt SRCS+=	rumpkern_syscalls.c
     31  1.110.2.7   yamt 
     32  1.110.2.7   yamt # autogenerated into the correct namespace
     33  1.110.2.7   yamt RUMPOBJ_NORENAME= rump_syscalls.o rump_syscalls.pico rump_syscalls.po
     34  1.110.2.7   yamt 
     35  1.110.2.7   yamt .ifdef RUMP_KERNEL_IS_LIBC
     36  1.110.2.7   yamt CPPFLAGS+= -DRUMP_KERNEL_IS_LIBC
     37  1.110.2.7   yamt .endif
     38  1.110.2.7   yamt 
     39  1.110.2.7   yamt # optional hypervisor interfaces
     40  1.110.2.7   yamt #SRCS+=	hyperstubs.c
     41       1.86  pooka 
     42       1.86  pooka # Multiprocessor or uniprocessor locking.  TODO: select right
     43       1.86  pooka # locking at runtime.
     44  1.110.2.7   yamt .if ${RUMP_LOCKS_UP:Uno} == "yes"
     45  1.110.2.7   yamt SRCS+=	locks_up.c
     46  1.110.2.7   yamt .else
     47       1.87  pooka SRCS+=	locks.c
     48  1.110.2.7   yamt .endif
     49       1.20  pooka 
     50      1.104  joerg MKREPRO?=no
     51      1.104  joerg 
     52      1.104  joerg .if ${MKREPRO} == "yes"
     53      1.104  joerg _NVFLAGS=-r
     54      1.104  joerg .else
     55      1.104  joerg _NVFLAGS=
     56      1.104  joerg .endif
     57      1.104  joerg 
     58  1.110.2.5   yamt vers.c: ${RUMPTOP}/../conf/newvers.sh ${RUMPTOP}/../conf/osrelease.sh \
     59  1.110.2.5   yamt 		${RUMPTOP}/../sys/param.h ${_NETBSD_VERSION_DEPENDS}
     60       1.69  pooka 	${_MKMSG_CREATE} vers.c
     61      1.104  joerg 	${HOST_SH} ${RUMPTOP}/../conf/newvers.sh -i RUMP-ROAST -n ${_NVFLAGS}
     62       1.69  pooka SRCS+=		vers.c
     63       1.69  pooka CLEANFILES+=	vers.c version
     64       1.69  pooka 
     65       1.20  pooka # autogenerated
     66       1.20  pooka #
     67       1.56  pooka SRCS+=	rump_syscalls.c rumpkern_if_wrappers.c
     68        1.1  pooka 
     69       1.82  pooka # "auto"generated
     70       1.82  pooka SRCS+=	devsw.c
     71       1.82  pooka 
     72       1.11  pooka #
     73       1.94  pooka # std kernel sources
     74       1.11  pooka #
     75        1.1  pooka # sys/kern
     76       1.94  pooka SRCS+=	init_sysctl_base.c	\
     77       1.94  pooka 	kern_auth.c		\
     78       1.94  pooka 	kern_cfglock.c		\
     79       1.94  pooka 	kern_descrip.c		\
     80       1.94  pooka 	kern_event.c		\
     81       1.94  pooka 	kern_hook.c		\
     82       1.94  pooka 	kern_ksyms.c		\
     83  1.110.2.7   yamt 	kern_malloc.c		\
     84       1.94  pooka 	kern_module.c		\
     85       1.94  pooka 	kern_mutex_obj.c	\
     86       1.94  pooka 	kern_ntptime.c		\
     87       1.94  pooka 	kern_proc.c		\
     88       1.95  pooka 	kern_prot.c		\
     89       1.94  pooka 	kern_rate.c		\
     90       1.94  pooka 	kern_resource.c		\
     91  1.110.2.2   yamt 	kern_rndpool.c		\
     92  1.110.2.2   yamt 	kern_rndq.c		\
     93  1.110.2.7   yamt 	kern_rndsink.c		\
     94       1.94  pooka 	kern_stub.c		\
     95       1.94  pooka 	kern_syscall.c		\
     96       1.94  pooka 	kern_sysctl.c		\
     97       1.94  pooka 	kern_tc.c		\
     98  1.110.2.7   yamt 	kern_time.c		\
     99       1.94  pooka 	kern_timeout.c		\
    100       1.94  pooka 	kern_uidinfo.c		\
    101       1.99  pooka 	kern_xxx.c		\
    102       1.94  pooka 	param.c			\
    103       1.94  pooka 	subr_devsw.c		\
    104       1.94  pooka 	subr_callback.c		\
    105       1.94  pooka 	subr_copy.c		\
    106  1.110.2.7   yamt 	subr_cprng.c		\
    107       1.94  pooka 	subr_device.c		\
    108       1.94  pooka 	subr_evcnt.c		\
    109       1.94  pooka 	subr_extent.c		\
    110       1.94  pooka 	subr_hash.c		\
    111       1.94  pooka 	subr_humanize.c		\
    112       1.94  pooka 	subr_iostat.c		\
    113  1.110.2.4   yamt 	subr_kcpuset.c		\
    114       1.94  pooka 	subr_kobj.c		\
    115       1.94  pooka 	subr_log.c		\
    116       1.94  pooka 	subr_lwp_specificdata.c	\
    117       1.94  pooka 	subr_once.c		\
    118  1.110.2.7   yamt 	subr_percpu.c		\
    119       1.94  pooka 	subr_prf.c		\
    120  1.110.2.4   yamt 	subr_pserialize.c	\
    121       1.94  pooka 	subr_specificdata.c	\
    122       1.94  pooka 	subr_time.c		\
    123  1.110.2.7   yamt 	subr_vmem.c		\
    124       1.94  pooka 	subr_workqueue.c	\
    125       1.94  pooka 	subr_xcall.c		\
    126       1.94  pooka 	sys_descrip.c		\
    127       1.94  pooka 	sys_generic.c		\
    128       1.94  pooka 	sys_module.c		\
    129       1.94  pooka 	sys_pipe.c		\
    130       1.94  pooka 	sys_select.c		\
    131  1.110.2.2   yamt 	syscalls.c		\
    132  1.110.2.2   yamt 	uipc_sem.c
    133       1.11  pooka 
    134       1.55  pooka # sys/uvm
    135  1.110.2.7   yamt SRCS+=	uvm_aobj.c uvm_readahead.c uvm_object.c uvm_swapstub.c
    136  1.110.2.1   yamt SRCS+=	uvm_page_array.c uvm_page_status.c
    137       1.55  pooka 
    138       1.43  pooka # 4.4BSD secmodel.  selection is hardcoded for now
    139  1.110.2.2   yamt SRCS+=	secmodel.c
    140       1.50   elad SRCS+=	secmodel_suser.c
    141       1.43  pooka 
    142       1.20  pooka # the funny bit.  this doesn't really belong here, but helps with the
    143       1.20  pooka # needs of kern_descrip.c.  And since it's a fully dynamic interface,
    144       1.20  pooka # it doesn't pull in other gunk.
    145       1.20  pooka SRCS+=	vnode_if.c
    146        1.1  pooka 
    147       1.11  pooka # sys/dev
    148       1.11  pooka SRCS+=	clock_subr.c
    149       1.11  pooka 
    150  1.110.2.7   yamt # sys/dev/crypto
    151  1.110.2.7   yamt # Note: these are here only for cprng.  More crypto algos for drivers
    152  1.110.2.7   yamt # are available from the rumpkern_crypto component
    153  1.110.2.7   yamt SRCS+=	nist_ctr_drbg.c
    154  1.110.2.7   yamt SRCS+=	rijndael-alg-fst.c
    155  1.110.2.7   yamt SRCS+=	rijndael-api-fst.c
    156  1.110.2.7   yamt SRCS+=	rijndael.c	
    157  1.110.2.7   yamt 
    158      1.107  pooka # compat
    159      1.107  pooka SRCS+=	kern_select_50.c
    160  1.110.2.7   yamt SRCS+=	kern_time_50.c
    161      1.107  pooka 
    162  1.110.2.4   yamt # Set RUMP_UNREAL_ALLOCATORS to "yes" to use memory allocation hypercalls
    163  1.110.2.4   yamt # directly instead of the kmem/pool allocators backed by hypercalls.
    164  1.110.2.4   yamt # Direct hypercalls may be a few percent faster, but don't emulate
    165  1.110.2.4   yamt # all kernel corner cases as well (not to mention if you want to debug the
    166       1.65  pooka # allocators themselves).
    167  1.110.2.4   yamt .if defined(RUMP_UNREAL_ALLOCATORS) && ${RUMP_UNREAL_ALLOCATORS} == "yes"
    168  1.110.2.7   yamt SRCS+=		memalloc.c
    169  1.110.2.4   yamt .else
    170  1.110.2.7   yamt SRCS+=		subr_kmem.c subr_pool.c
    171  1.110.2.4   yamt .endif
    172        1.6  pooka 
    173      1.106  pooka .ifdef RUMP_LOCKDEBUG
    174      1.106  pooka SRCS+=		subr_lockdebug.c
    175      1.106  pooka .endif
    176      1.106  pooka 
    177  1.110.2.7   yamt .if ${RUMP_KTRACE} == "yes"
    178  1.110.2.7   yamt SRCS+=		kern_ktrace.c
    179  1.110.2.7   yamt .endif
    180  1.110.2.7   yamt 
    181        1.1  pooka # no shlib_version because this is automatically in sync with lib/librump
    182        1.1  pooka SHLIB_MAJOR=    0
    183        1.1  pooka SHLIB_MINOR=    0
    184        1.1  pooka 
    185       1.47  pooka CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs
    186       1.47  pooka CPPFLAGS+=	-I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpdev
    187      1.109  joerg AFLAGS+=	-D_LOCORE -Wa,--fatal-warnings
    188        1.1  pooka 
    189       1.27  pooka #
    190       1.27  pooka # If archdir exists, it is required to provide:
    191       1.27  pooka # 1) kobj_reloc() and kobj_machdep()
    192       1.52  pooka # 2) rump_cpu_bootstrap()
    193       1.52  pooka # 3) ...?
    194       1.52  pooka # 4) PROFIT!
    195       1.27  pooka #
    196       1.30  pooka 
    197       1.30  pooka #
    198       1.34  pooka # Check if we are building compat.  In compat mode we need to provide
    199       1.34  pooka # the kernel of our compat target (amd64->i386 & sparc64->sparc), so
    200       1.34  pooka # take MD stuff from the right arch.
    201       1.30  pooka #
    202       1.67    mrg .ifdef MLIBDIR
    203       1.67    mrg ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MLIBDIR}
    204       1.67    mrg LIBKERN_ARCH=	${MLIBDIR}
    205       1.68   matt .elif exists(${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU})
    206       1.68   matt ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU}
    207       1.30  pooka .else
    208       1.24  pooka ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH}
    209       1.30  pooka .endif
    210  1.110.2.7   yamt .if !exists(${ARCHDIR})
    211  1.110.2.7   yamt ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/generic
    212  1.110.2.7   yamt .endif
    213  1.110.2.7   yamt 
    214       1.24  pooka .include "${ARCHDIR}/Makefile.inc"
    215       1.24  pooka .PATH:	${ARCHDIR}
    216       1.24  pooka 
    217       1.90  pooka .if ${MACHINE} == "sun3"
    218       1.90  pooka CPPFLAGS+=	-Dsun3
    219       1.90  pooka .endif
    220       1.90  pooka 
    221       1.31  pooka # include libkern source files
    222       1.31  pooka KERNDIR=${RUMPTOP}/../lib/libkern
    223  1.110.2.7   yamt .if "${_RUMP_NATIVEABI}" == "yes"
    224       1.84  pooka KERNMISCCPPFLAGS+=	-D_RUMPKERNEL
    225       1.84  pooka .endif
    226       1.31  pooka .include "${RUMPTOP}/../lib/libkern/Makefile.libkern"
    227       1.31  pooka 
    228       1.36  pooka # Some architectures require a little special massage with atomic
    229       1.36  pooka # compare-and-swap.  This is because the kernel version is using
    230      1.105  pooka # instructions or routines unavailable to us in userspace.
    231       1.36  pooka #
    232  1.110.2.7   yamt .if (${MACHINE_CPU} == "arm" && "${FEAT_LDREX}" != "yes") \
    233  1.110.2.7   yamt     || ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "hppa" \
    234       1.37  pooka     || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \
    235  1.110.2.7   yamt     || ${MACHINE_ARCH} == "vax" || ${MACHINE_ARCH} == "m68000"
    236       1.36  pooka CPPFLAGS+=	-I${RUMPTOP}/../../common/lib/libc/atomic
    237      1.101  pooka SRCS+=		atomic_cas_generic.c
    238      1.105  pooka #SRCS+=		rump_atomic_cas_up.c
    239      1.101  pooka .endif
    240       1.36  pooka 
    241        1.1  pooka .include <bsd.lib.mk>
    242        1.1  pooka .include <bsd.klinks.mk>
    243