| @@ -1,90 +1,98 @@ | | | @@ -1,90 +1,98 @@ |
1 | # $NetBSD: Makefile.rumpkern,v 1.29 2009/01/02 02:54:13 pooka Exp $ | | 1 | # $NetBSD: Makefile.rumpkern,v 1.30 2009/01/02 14:03:15 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 | LDFLAGS+= -Wl,--wrap=malloc | | 7 | LDFLAGS+= -Wl,--wrap=malloc |
8 | | | 8 | |
9 | .PATH: ${RUMPTOP}/librump/rumpkern \ | | 9 | .PATH: ${RUMPTOP}/librump/rumpkern \ |
10 | ${RUMPTOP}/../kern ${RUMPTOP}/../lib/libkern \ | | 10 | ${RUMPTOP}/../kern ${RUMPTOP}/../lib/libkern \ |
11 | ${RUMPTOP}/../conf ${RUMPTOP}/../dev \ | | 11 | ${RUMPTOP}/../conf ${RUMPTOP}/../dev \ |
12 | ${RUMPTOP}/../../common/lib/libutil \ | | 12 | ${RUMPTOP}/../../common/lib/libutil \ |
13 | ${RUMPTOP}/../../common/lib/libutil \ | | 13 | ${RUMPTOP}/../../common/lib/libutil \ |
14 | ${RUMPTOP}/../../common/lib/libc/gen \ | | 14 | ${RUMPTOP}/../../common/lib/libc/gen \ |
15 | ${RUMPTOP}/../../common/lib/libc/stdlib | | 15 | ${RUMPTOP}/../../common/lib/libc/stdlib |
16 | | | 16 | |
17 | # | | 17 | # |
18 | # Source modules, first the ones specifically implemented for librump. | | 18 | # Source modules, first the ones specifically implemented for librump. |
19 | # | | 19 | # |
20 | SRCS= rump.c emul.c intr.c locks.c ltsleep.c percpu.c pool.c sleepq.c vm.c | | 20 | SRCS= rump.c emul.c intr.c locks.c ltsleep.c percpu.c pool.c sleepq.c vm.c |
21 | | | 21 | |
22 | # stubs | | 22 | # stubs |
23 | # | | 23 | # |
24 | SRCS+= misc_stub.c pmap_stub.c | | 24 | SRCS+= misc_stub.c pmap_stub.c |
25 | | | 25 | |
26 | # autogenerated | | 26 | # autogenerated |
27 | # | | 27 | # |
28 | SRCS+= rump_syscalls.c | | 28 | SRCS+= rump_syscalls.c |
29 | | | 29 | |
30 | # | | 30 | # |
31 | # Rest are from the std kernel sources. | | 31 | # Rest are from the std kernel sources. |
32 | # | | 32 | # |
33 | # sys/kern | | 33 | # sys/kern |
34 | SRCS+= kern_auth.c kern_descrip.c kern_ksyms.c kern_malloc_stdtype.c \ | | 34 | SRCS+= kern_auth.c kern_descrip.c kern_ksyms.c kern_malloc_stdtype.c \ |
35 | kern_module.c kern_rate.c kern_stub.c kern_sysctl.c \ | | 35 | kern_module.c kern_rate.c kern_stub.c kern_sysctl.c \ |
36 | kern_timeout.c kern_uidinfo.c param.c sys_descrip.c \ | | 36 | kern_timeout.c kern_uidinfo.c param.c sys_descrip.c \ |
37 | sys_generic.c | | 37 | sys_generic.c |
38 | | | 38 | |
39 | # sys/kern subr (misc) | | 39 | # sys/kern subr (misc) |
40 | SRCS+= subr_devsw.c subr_callback.c subr_hash.c subr_iostat.c \ | | 40 | SRCS+= subr_devsw.c subr_callback.c subr_hash.c subr_iostat.c \ |
41 | subr_kobj.c subr_log.c subr_once.c subr_prf.c \ | | 41 | subr_kobj.c subr_log.c subr_once.c subr_prf.c \ |
42 | subr_specificdata.c subr_time.c subr_workqueue.c | | 42 | subr_specificdata.c subr_time.c subr_workqueue.c |
43 | | | 43 | |
44 | # the funny bit. this doesn't really belong here, but helps with the | | 44 | # the funny bit. this doesn't really belong here, but helps with the |
45 | # needs of kern_descrip.c. And since it's a fully dynamic interface, | | 45 | # needs of kern_descrip.c. And since it's a fully dynamic interface, |
46 | # it doesn't pull in other gunk. | | 46 | # it doesn't pull in other gunk. |
47 | SRCS+= vnode_if.c | | 47 | SRCS+= vnode_if.c |
48 | | | 48 | |
49 | # sys/dev | | 49 | # sys/dev |
50 | SRCS+= clock_subr.c | | 50 | SRCS+= clock_subr.c |
51 | | | 51 | |
52 | # sys/lib/libkern | | 52 | # sys/lib/libkern |
53 | SRCS+= __assert.c scanc.c skpc.c | | 53 | SRCS+= __assert.c scanc.c skpc.c |
54 | | | 54 | |
55 | # src/common | | 55 | # src/common |
56 | SRCS+= snprintb.c rb.c heapsort.c | | 56 | SRCS+= snprintb.c rb.c heapsort.c |
57 | | | 57 | |
58 | # uncomment these lines if you want to use the real kmem code | | 58 | # uncomment these lines if you want to use the real kmem code |
59 | #CPPFLAGS+= -DRUMP_USE_REAL_KMEM | | 59 | #CPPFLAGS+= -DRUMP_USE_REAL_KMEM |
60 | #SRCS+= subr_kmem.c subr_vmem.c | | 60 | #SRCS+= subr_kmem.c subr_vmem.c |
61 | | | 61 | |
62 | .if ${MACHINE_ARCH} == "vax" | | 62 | .if ${MACHINE_ARCH} == "vax" |
63 | .PATH: ${RUMPTOP}/../lib/libkern/arch/vax | | 63 | .PATH: ${RUMPTOP}/../lib/libkern/arch/vax |
64 | SRCS+= blkset.S | | 64 | SRCS+= blkset.S |
65 | .endif | | 65 | .endif |
66 | | | 66 | |
67 | # no shlib_version because this is automatically in sync with lib/librump | | 67 | # no shlib_version because this is automatically in sync with lib/librump |
68 | SHLIB_MAJOR= 0 | | 68 | SHLIB_MAJOR= 0 |
69 | SHLIB_MINOR= 0 | | 69 | SHLIB_MINOR= 0 |
70 | | | 70 | |
71 | CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern | | 71 | CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern |
72 | CPPFLAGS+= -I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpvfs | | 72 | CPPFLAGS+= -I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpvfs |
73 | CFLAGS+= -Wno-pointer-sign | | 73 | CFLAGS+= -Wno-pointer-sign |
74 | | | 74 | |
75 | # | | 75 | # |
76 | # If archdir exists, it is required to provide: | | 76 | # If archdir exists, it is required to provide: |
77 | # 1) kobj_reloc() and kobj_machdep() | | 77 | # 1) kobj_reloc() and kobj_machdep() |
78 | # 2) ...? | | 78 | # 2) ...? |
79 | # 3) PROFIT! | | 79 | # 3) PROFIT! |
80 | # | | 80 | # |
| | | 81 | |
| | | 82 | # |
| | | 83 | # XXX: THIS IS UGLY, NEEDS BETTER FIX FOR COMPAT LIB |
| | | 84 | # |
| | | 85 | .ifdef(LD32DIR) |
| | | 86 | ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${LD32DIR} |
| | | 87 | .else |
81 | ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH} | | 88 | ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH} |
| | | 89 | .endif |
82 | .if exists(${ARCHDIR}) | | 90 | .if exists(${ARCHDIR}) |
83 | .include "${ARCHDIR}/Makefile.inc" | | 91 | .include "${ARCHDIR}/Makefile.inc" |
84 | .PATH: ${ARCHDIR} | | 92 | .PATH: ${ARCHDIR} |
85 | .else | | 93 | .else |
86 | SRCS+= kobj_stubs.c | | 94 | SRCS+= kobj_stubs.c |
87 | .endif | | 95 | .endif |
88 | | | 96 | |
89 | .include <bsd.lib.mk> | | 97 | .include <bsd.lib.mk> |
90 | .include <bsd.klinks.mk> | | 98 | .include <bsd.klinks.mk> |