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