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