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