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