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