Home | History | Annotate | Line # | Download | only in rumpkern
Makefile.rumpkern revision 1.40.2.2
      1  1.40.2.2    jym #	$NetBSD: Makefile.rumpkern,v 1.40.2.2 2009/07/23 23:32:54 jym 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.31  pooka 	${RUMPTOP}/../conf					\
     11  1.40.2.1    jym 	${RUMPTOP}/../dev					\
     12  1.40.2.1    jym 	${RUMPTOP}/../secmodel/bsd44
     13       1.1  pooka 
     14      1.11  pooka #
     15      1.14  pooka # Source modules, first the ones specifically implemented for librump.
     16      1.11  pooka # 
     17  1.40.2.1    jym SRCS=	rump.c emul.c intr.c locks.c ltsleep.c percpu.c pool.c	\
     18  1.40.2.1    jym 	sleepq.c sysproxy_socket.c vm.c
     19      1.20  pooka 
     20      1.14  pooka # stubs
     21      1.20  pooka #
     22      1.20  pooka SRCS+=	misc_stub.c pmap_stub.c
     23      1.20  pooka 
     24      1.20  pooka # autogenerated
     25      1.20  pooka #
     26      1.20  pooka SRCS+=	rump_syscalls.c
     27       1.1  pooka 
     28      1.11  pooka #
     29      1.11  pooka # Rest are from the std kernel sources.
     30      1.11  pooka #
     31       1.1  pooka # sys/kern
     32  1.40.2.1    jym SRCS+=	kern_auth.c kern_descrip.c kern_event.c kern_ksyms.c		\
     33  1.40.2.1    jym 	kern_malloc_stdtype.c kern_module.c kern_rate.c kern_stub.c	\
     34  1.40.2.1    jym 	kern_sysctl.c kern_timeout.c kern_uidinfo.c param.c		\
     35  1.40.2.2    jym 	sys_descrip.c sys_generic.c syscalls.c
     36      1.11  pooka 
     37      1.11  pooka # sys/kern subr (misc)
     38  1.40.2.1    jym SRCS+=	subr_devsw.c subr_callback.c subr_evcnt.c subr_hash.c		\
     39  1.40.2.1    jym 	subr_iostat.c subr_kobj.c subr_log.c subr_once.c subr_prf.c	\
     40      1.29  pooka 	subr_specificdata.c subr_time.c subr_workqueue.c
     41      1.11  pooka 
     42  1.40.2.1    jym # 4.4BSD secmodel.  selection is hardcoded for now
     43  1.40.2.1    jym SRCS+=	secmodel_bsd44.c secmodel_bsd44_logic.c secmodel_bsd44_suser.c
     44  1.40.2.1    jym 
     45      1.20  pooka # the funny bit.  this doesn't really belong here, but helps with the
     46      1.20  pooka # needs of kern_descrip.c.  And since it's a fully dynamic interface,
     47      1.20  pooka # it doesn't pull in other gunk.
     48      1.20  pooka SRCS+=	vnode_if.c
     49       1.1  pooka 
     50      1.11  pooka # sys/dev
     51      1.11  pooka SRCS+=	clock_subr.c
     52      1.11  pooka 
     53      1.39  pooka # Comment these if you want to use malloc(3) directly instead of
     54      1.39  pooka # the kernel allocators.  It's a few percent faster, but doesn't
     55      1.39  pooka # emulate all kernel corner cases as well.
     56      1.40  pooka #CPPFLAGS+=	-DRUMP_USE_REAL_ALLOCATORS
     57      1.40  pooka #SRCS+=		subr_kmem.c subr_pool.c subr_vmem.c
     58       1.6  pooka 
     59       1.1  pooka # no shlib_version because this is automatically in sync with lib/librump
     60       1.1  pooka SHLIB_MAJOR=    0
     61       1.1  pooka SHLIB_MINOR=    0
     62       1.1  pooka 
     63      1.25  pooka CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern
     64      1.20  pooka CPPFLAGS+=	-I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpvfs
     65       1.1  pooka CFLAGS+=	-Wno-pointer-sign
     66      1.32  pooka AFLAGS+=	-D_LOCORE -Wa,-fatal-warnings
     67       1.1  pooka 
     68      1.27  pooka #
     69      1.27  pooka # If archdir exists, it is required to provide:
     70      1.27  pooka # 1) kobj_reloc() and kobj_machdep()
     71      1.27  pooka # 2) ...?
     72      1.27  pooka # 3) PROFIT!
     73      1.27  pooka #
     74      1.30  pooka 
     75      1.30  pooka #
     76      1.34  pooka # Check if we are building compat.  In compat mode we need to provide
     77      1.34  pooka # the kernel of our compat target (amd64->i386 & sparc64->sparc), so
     78      1.34  pooka # take MD stuff from the right arch.
     79      1.30  pooka #
     80      1.38     he .ifdef LD32DIR
     81      1.30  pooka ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${LD32DIR}
     82      1.31  pooka LIBKERN_ARCH=	${LD32DIR}
     83      1.30  pooka .else
     84      1.24  pooka ARCHDIR=	${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH}
     85      1.30  pooka .endif
     86      1.24  pooka .if exists(${ARCHDIR})
     87      1.24  pooka .include "${ARCHDIR}/Makefile.inc"
     88      1.24  pooka .PATH:	${ARCHDIR}
     89      1.27  pooka .else
     90      1.27  pooka SRCS+=	kobj_stubs.c
     91      1.24  pooka .endif
     92      1.24  pooka 
     93      1.31  pooka # include libkern source files
     94      1.31  pooka KERNDIR=${RUMPTOP}/../lib/libkern
     95      1.31  pooka .include "${RUMPTOP}/../lib/libkern/Makefile.libkern"
     96      1.31  pooka 
     97      1.36  pooka # Some architectures require a little special massage with atomic
     98      1.36  pooka # compare-and-swap.  This is because the kernel version is using
     99      1.36  pooka # instructions or routines unavailable to us in userspace.  We
    100      1.36  pooka # use effectively the multiprocessor version of the userspace ops.
    101      1.36  pooka #
    102      1.36  pooka .if ${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "hppa" \
    103      1.37  pooka     || ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \
    104      1.37  pooka     || ${MACHINE_CPU} == "vax"
    105      1.36  pooka CPPFLAGS+=	-I${RUMPTOP}/../../common/lib/libc/atomic
    106      1.36  pooka SRCS+=		atomic_cas_generic.c
    107      1.36  pooka .endif
    108      1.36  pooka 
    109       1.1  pooka .include <bsd.lib.mk>
    110       1.1  pooka .include <bsd.klinks.mk>
    111