Home | History | Annotate | Line # | Download | only in rumpkern
Makefile.rumpkern revision 1.73.2.2
      1  1.73.2.1  uebayasi #	$NetBSD: Makefile.rumpkern,v 1.73.2.2 2010/08/17 06:48:00 uebayasi Exp $
      2       1.1     pooka #
      3       1.1     pooka 
      4       1.1     pooka .include "${RUMPTOP}/Makefile.rump"
      5       1.1     pooka 
      6       1.1     pooka LIB=		rump
      7       1.1     pooka 
      8       1.1     pooka .PATH:	${RUMPTOP}/librump/rumpkern				\
      9      1.31     pooka 	${RUMPTOP}/../kern					\
     10      1.55     pooka 	${RUMPTOP}/../uvm					\
     11      1.31     pooka 	${RUMPTOP}/../conf					\
     12      1.43     pooka 	${RUMPTOP}/../dev					\
     13      1.50      elad 	${RUMPTOP}/../secmodel/suser
     14       1.1     pooka 
     15      1.11     pooka #
     16      1.14     pooka # Source modules, first the ones specifically implemented for librump.
     17      1.11     pooka # 
     18  1.73.2.2  uebayasi SRCS=	rump.c rumpcopy.c emul.c intr.c klock.c kobj_rename.c	\
     19  1.73.2.1  uebayasi 	ltsleep.c memalloc.c scheduler.c signals.c sleepq.c	\
     20  1.73.2.1  uebayasi 	sysproxy_socket.c threads.c vm.c
     21  1.73.2.2  uebayasi SRCS+=	compat.c
     22      1.20     pooka 
     23  1.73.2.2  uebayasi # Multiprocessor or uniprocessor locking.  TODO: select right
     24  1.73.2.2  uebayasi # locking at runtime.
     25  1.73.2.2  uebayasi SRCS+=	locks.c
     26  1.73.2.2  uebayasi #SRCS+=	locks_up.c
     27  1.73.2.2  uebayasi 
     28  1.73.2.2  uebayasi vers.c: ${RUMPTOP}/../conf/newvers.sh ${RUMPTOP}/../conf/osrelease.sh ${RUMPTOP}/../sys/param.h
     29      1.69     pooka 	${_MKMSG_CREATE} vers.c
     30      1.70     pooka 	${HOST_SH} ${RUMPTOP}/../conf/newvers.sh -i RUMP-ROAST -n
     31      1.69     pooka SRCS+=		vers.c
     32      1.69     pooka CLEANFILES+=	vers.c version
     33      1.69     pooka 
     34  1.73.2.2  uebayasi # use MI pmap for archs not conforming to kernel ABI
     35  1.73.2.2  uebayasi .ifndef RUMPKMOD
     36      1.62     pooka SRCS+=	pmap_stub.c
     37  1.73.2.2  uebayasi .endif
     38      1.20     pooka 
     39      1.20     pooka # autogenerated
     40      1.20     pooka #
     41      1.56     pooka SRCS+=	rump_syscalls.c rumpkern_if_wrappers.c
     42       1.1     pooka 
     43  1.73.2.2  uebayasi # "auto"generated
     44  1.73.2.2  uebayasi SRCS+=	devsw.c
     45  1.73.2.2  uebayasi 
     46      1.11     pooka #
     47      1.11     pooka # Rest are from the std kernel sources.
     48      1.11     pooka #
     49       1.1     pooka # sys/kern
     50      1.48     pooka SRCS+=	init_sysctl_base.c kern_auth.c kern_descrip.c kern_event.c	\
     51      1.72     pooka 	kern_hook.c kern_ksyms.c kern_malloc_stdtype.c kern_module.c	\
     52  1.73.2.2  uebayasi 	kern_mutex_obj.c kern_ntptime.c kern_proc.c kern_rate.c		\
     53  1.73.2.2  uebayasi 	kern_resource.c kern_stub.c kern_syscall.c kern_sysctl.c	\
     54  1.73.2.2  uebayasi 	kern_tc.c kern_timeout.c kern_uidinfo.c param.c sys_descrip.c	\
     55  1.73.2.1  uebayasi 	sys_generic.c sys_module.c sys_pipe.c sys_select.c syscalls.c
     56      1.11     pooka 
     57      1.11     pooka # sys/kern subr (misc)
     58      1.73     pooka SRCS+=	subr_devsw.c subr_callback.c subr_copy.c subr_device.c		\
     59      1.73     pooka 	subr_evcnt.c subr_extent.c subr_hash.c subr_humanize.c		\
     60  1.73.2.1  uebayasi 	subr_iostat.c subr_kobj.c subr_log.c subr_lwp_specificdata.c	\
     61  1.73.2.1  uebayasi 	subr_once.c subr_prf.c subr_specificdata.c subr_time.c		\
     62  1.73.2.1  uebayasi 	subr_workqueue.c subr_xcall.c
     63      1.11     pooka 
     64      1.55     pooka # sys/uvm
     65      1.55     pooka SRCS+=	uvm_readahead.c
     66      1.55     pooka 
     67      1.43     pooka # 4.4BSD secmodel.  selection is hardcoded for now
     68      1.50      elad SRCS+=	secmodel_suser.c
     69      1.43     pooka 
     70      1.20     pooka # the funny bit.  this doesn't really belong here, but helps with the
     71      1.20     pooka # needs of kern_descrip.c.  And since it's a fully dynamic interface,
     72      1.20     pooka # it doesn't pull in other gunk.
     73      1.20     pooka SRCS+=	vnode_if.c
     74       1.1     pooka 
     75      1.11     pooka # sys/dev
     76      1.11     pooka SRCS+=	clock_subr.c
     77      1.11     pooka 
     78      1.65     pooka # Flip the comment to the other line if you want to use malloc(3)
     79      1.65     pooka # directly instead of the kernel allocators backed by malloc(3)/mmap(2).
     80      1.65     pooka # Libc malloc is a few percent faster, but doesn't emulate all kernel
     81      1.65     pooka # corner cases as well (not to mention if you want to debug the
     82      1.65     pooka # allocators themselves).
     83      1.65     pooka #CPPFLAGS+=	-DRUMP_USE_UNREAL_ALLOCATORS
     84      1.71     pooka SRCS+=		subr_kmem.c subr_percpu.c subr_pool.c subr_vmem.c
     85       1.6     pooka 
     86       1.1     pooka # no shlib_version because this is automatically in sync with lib/librump
     87       1.1     pooka SHLIB_MAJOR=    0
     88       1.1     pooka SHLIB_MINOR=    0
     89       1.1     pooka 
     90      1.47     pooka CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs
     91      1.47     pooka CPPFLAGS+=	-I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpdev
     92      1.32     pooka AFLAGS+=	-D_LOCORE -Wa,-fatal-warnings
     93       1.1     pooka 
     94      1.27     pooka #
     95      1.27     pooka # If archdir exists, it is required to provide:
     96      1.27     pooka # 1) kobj_reloc() and kobj_machdep()
     97      1.52     pooka # 2) rump_cpu_bootstrap()
     98      1.52     pooka # 3) ...?
     99      1.52     pooka # 4) PROFIT!
    100      1.27     pooka #
    101      1.30     pooka 
    102      1.30     pooka #
    103      1.34     pooka # Check if we are building compat.  In compat mode we need to provide
    104      1.34     pooka # the kernel of our compat target (amd64->i386 & sparc64->sparc), so
    105      1.34     pooka # take MD stuff from the right arch.
    106      1.30     pooka #
    107      1.67       mrg .ifdef MLIBDIR
    108      1.67       mrg ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MLIBDIR}
    109      1.67       mrg LIBKERN_ARCH=	${MLIBDIR}
    110      1.68      matt .elif exists(${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU})
    111      1.68      matt ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU}
    112      1.30     pooka .else
    113      1.24     pooka ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH}
    114      1.30     pooka .endif
    115      1.24     pooka .if exists(${ARCHDIR})
    116      1.24     pooka .include "${ARCHDIR}/Makefile.inc"
    117      1.24     pooka .PATH:	${ARCHDIR}
    118      1.27     pooka .else
    119      1.52     pooka SRCS+=	kobj_stubs.c rumpcpu_generic.c
    120      1.24     pooka .endif
    121      1.24     pooka 
    122  1.73.2.2  uebayasi .if ${MACHINE} == "sun3"
    123  1.73.2.2  uebayasi CPPFLAGS+=	-Dsun3
    124  1.73.2.2  uebayasi .endif
    125  1.73.2.2  uebayasi 
    126      1.31     pooka # include libkern source files
    127      1.31     pooka KERNDIR=${RUMPTOP}/../lib/libkern
    128  1.73.2.2  uebayasi .ifdef RUMPKMOD
    129  1.73.2.2  uebayasi KERNMISCCPPFLAGS+=	-D_RUMPKERNEL
    130  1.73.2.2  uebayasi .endif
    131      1.31     pooka .include "${RUMPTOP}/../lib/libkern/Makefile.libkern"
    132      1.31     pooka 
    133      1.36     pooka # Some architectures require a little special massage with atomic
    134      1.36     pooka # compare-and-swap.  This is because the kernel version is using
    135      1.36     pooka # instructions or routines unavailable to us in userspace.  We
    136      1.36     pooka # use effectively the multiprocessor version of the userspace ops.
    137      1.36     pooka #
    138      1.36     pooka .if ${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "hppa" \
    139      1.37     pooka     || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \
    140      1.54  christos     || ${MACHINE_CPU} == "vax" || ${MACHINE_ARCH} == "m68000"
    141      1.36     pooka CPPFLAGS+=	-I${RUMPTOP}/../../common/lib/libc/atomic
    142      1.36     pooka SRCS+=		atomic_cas_generic.c
    143      1.36     pooka .endif
    144      1.36     pooka 
    145       1.1     pooka .include <bsd.lib.mk>
    146       1.1     pooka .include <bsd.klinks.mk>
    147