Home | History | Annotate | Line # | Download | only in rumpkern
Makefile.rumpkern revision 1.73.2.4
      1  1.73.2.4  uebayasi #	$NetBSD: Makefile.rumpkern,v 1.73.2.4 2010/11/06 08:08:51 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.3  uebayasi SRCS=	rump.c rumpcopy.c emul.c intr.c lwproc.c klock.c	\
     19  1.73.2.3  uebayasi 	kobj_rename.c ltsleep.c memalloc.c scheduler.c		\
     20  1.73.2.4  uebayasi 	signals.c sleepq.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.73.2.3  uebayasi # std kernel sources
     48      1.11     pooka #
     49       1.1     pooka # sys/kern
     50  1.73.2.3  uebayasi SRCS+=	init_sysctl_base.c	\
     51  1.73.2.3  uebayasi 	kern_auth.c		\
     52  1.73.2.3  uebayasi 	kern_cfglock.c		\
     53  1.73.2.3  uebayasi 	kern_descrip.c		\
     54  1.73.2.3  uebayasi 	kern_event.c		\
     55  1.73.2.3  uebayasi 	kern_hook.c		\
     56  1.73.2.3  uebayasi 	kern_ksyms.c		\
     57  1.73.2.3  uebayasi 	kern_malloc_stdtype.c	\
     58  1.73.2.3  uebayasi 	kern_module.c		\
     59  1.73.2.3  uebayasi 	kern_mutex_obj.c	\
     60  1.73.2.3  uebayasi 	kern_ntptime.c		\
     61  1.73.2.3  uebayasi 	kern_proc.c		\
     62  1.73.2.3  uebayasi 	kern_prot.c		\
     63  1.73.2.3  uebayasi 	kern_rate.c		\
     64  1.73.2.3  uebayasi 	kern_resource.c		\
     65  1.73.2.3  uebayasi 	kern_stub.c		\
     66  1.73.2.3  uebayasi 	kern_syscall.c		\
     67  1.73.2.3  uebayasi 	kern_sysctl.c		\
     68  1.73.2.3  uebayasi 	kern_tc.c		\
     69  1.73.2.3  uebayasi 	kern_timeout.c		\
     70  1.73.2.3  uebayasi 	kern_uidinfo.c		\
     71  1.73.2.3  uebayasi 	param.c			\
     72  1.73.2.3  uebayasi 	subr_devsw.c		\
     73  1.73.2.3  uebayasi 	subr_callback.c		\
     74  1.73.2.3  uebayasi 	subr_copy.c		\
     75  1.73.2.3  uebayasi 	subr_device.c		\
     76  1.73.2.3  uebayasi 	subr_evcnt.c		\
     77  1.73.2.3  uebayasi 	subr_extent.c		\
     78  1.73.2.3  uebayasi 	subr_hash.c		\
     79  1.73.2.3  uebayasi 	subr_humanize.c		\
     80  1.73.2.3  uebayasi 	subr_iostat.c		\
     81  1.73.2.3  uebayasi 	subr_kobj.c		\
     82  1.73.2.3  uebayasi 	subr_log.c		\
     83  1.73.2.3  uebayasi 	subr_lwp_specificdata.c	\
     84  1.73.2.3  uebayasi 	subr_once.c		\
     85  1.73.2.3  uebayasi 	subr_prf.c		\
     86  1.73.2.3  uebayasi 	subr_specificdata.c	\
     87  1.73.2.3  uebayasi 	subr_time.c		\
     88  1.73.2.3  uebayasi 	subr_workqueue.c	\
     89  1.73.2.3  uebayasi 	subr_xcall.c		\
     90  1.73.2.3  uebayasi 	sys_descrip.c		\
     91  1.73.2.3  uebayasi 	sys_generic.c		\
     92  1.73.2.3  uebayasi 	sys_module.c		\
     93  1.73.2.3  uebayasi 	sys_pipe.c		\
     94  1.73.2.3  uebayasi 	sys_select.c		\
     95  1.73.2.3  uebayasi 	syscalls.c
     96      1.11     pooka 
     97      1.55     pooka # sys/uvm
     98  1.73.2.3  uebayasi SRCS+=	uvm_aobj.c uvm_readahead.c
     99      1.55     pooka 
    100      1.43     pooka # 4.4BSD secmodel.  selection is hardcoded for now
    101      1.50      elad SRCS+=	secmodel_suser.c
    102      1.43     pooka 
    103      1.20     pooka # the funny bit.  this doesn't really belong here, but helps with the
    104      1.20     pooka # needs of kern_descrip.c.  And since it's a fully dynamic interface,
    105      1.20     pooka # it doesn't pull in other gunk.
    106      1.20     pooka SRCS+=	vnode_if.c
    107       1.1     pooka 
    108      1.11     pooka # sys/dev
    109      1.11     pooka SRCS+=	clock_subr.c
    110      1.11     pooka 
    111      1.65     pooka # Flip the comment to the other line if you want to use malloc(3)
    112      1.65     pooka # directly instead of the kernel allocators backed by malloc(3)/mmap(2).
    113      1.65     pooka # Libc malloc is a few percent faster, but doesn't emulate all kernel
    114      1.65     pooka # corner cases as well (not to mention if you want to debug the
    115      1.65     pooka # allocators themselves).
    116      1.65     pooka #CPPFLAGS+=	-DRUMP_USE_UNREAL_ALLOCATORS
    117      1.71     pooka SRCS+=		subr_kmem.c subr_percpu.c subr_pool.c subr_vmem.c
    118       1.6     pooka 
    119       1.1     pooka # no shlib_version because this is automatically in sync with lib/librump
    120       1.1     pooka SHLIB_MAJOR=    0
    121       1.1     pooka SHLIB_MINOR=    0
    122       1.1     pooka 
    123      1.47     pooka CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs
    124      1.47     pooka CPPFLAGS+=	-I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpdev
    125      1.32     pooka AFLAGS+=	-D_LOCORE -Wa,-fatal-warnings
    126       1.1     pooka 
    127      1.27     pooka #
    128      1.27     pooka # If archdir exists, it is required to provide:
    129      1.27     pooka # 1) kobj_reloc() and kobj_machdep()
    130      1.52     pooka # 2) rump_cpu_bootstrap()
    131      1.52     pooka # 3) ...?
    132      1.52     pooka # 4) PROFIT!
    133      1.27     pooka #
    134      1.30     pooka 
    135      1.30     pooka #
    136      1.34     pooka # Check if we are building compat.  In compat mode we need to provide
    137      1.34     pooka # the kernel of our compat target (amd64->i386 & sparc64->sparc), so
    138      1.34     pooka # take MD stuff from the right arch.
    139      1.30     pooka #
    140      1.67       mrg .ifdef MLIBDIR
    141      1.67       mrg ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MLIBDIR}
    142      1.67       mrg LIBKERN_ARCH=	${MLIBDIR}
    143      1.68      matt .elif exists(${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU})
    144      1.68      matt ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU}
    145      1.30     pooka .else
    146      1.24     pooka ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH}
    147      1.30     pooka .endif
    148      1.24     pooka .if exists(${ARCHDIR})
    149      1.24     pooka .include "${ARCHDIR}/Makefile.inc"
    150      1.24     pooka .PATH:	${ARCHDIR}
    151      1.27     pooka .else
    152      1.52     pooka SRCS+=	kobj_stubs.c rumpcpu_generic.c
    153      1.24     pooka .endif
    154      1.24     pooka 
    155  1.73.2.2  uebayasi .if ${MACHINE} == "sun3"
    156  1.73.2.2  uebayasi CPPFLAGS+=	-Dsun3
    157  1.73.2.2  uebayasi .endif
    158  1.73.2.2  uebayasi 
    159      1.31     pooka # include libkern source files
    160      1.31     pooka KERNDIR=${RUMPTOP}/../lib/libkern
    161  1.73.2.2  uebayasi .ifdef RUMPKMOD
    162  1.73.2.2  uebayasi KERNMISCCPPFLAGS+=	-D_RUMPKERNEL
    163  1.73.2.2  uebayasi .endif
    164      1.31     pooka .include "${RUMPTOP}/../lib/libkern/Makefile.libkern"
    165      1.31     pooka 
    166      1.36     pooka # Some architectures require a little special massage with atomic
    167      1.36     pooka # compare-and-swap.  This is because the kernel version is using
    168      1.36     pooka # instructions or routines unavailable to us in userspace.  We
    169      1.36     pooka # use effectively the multiprocessor version of the userspace ops.
    170      1.36     pooka #
    171      1.36     pooka .if ${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "hppa" \
    172      1.37     pooka     || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \
    173      1.54  christos     || ${MACHINE_CPU} == "vax" || ${MACHINE_ARCH} == "m68000"
    174      1.36     pooka CPPFLAGS+=	-I${RUMPTOP}/../../common/lib/libc/atomic
    175      1.36     pooka SRCS+=		atomic_cas_generic.c
    176      1.36     pooka .endif
    177      1.36     pooka 
    178       1.1     pooka .include <bsd.lib.mk>
    179       1.1     pooka .include <bsd.klinks.mk>
    180