-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
49 lines (40 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
KERNEL_OBJ = bin/kernel/unbucklekv
obj-m = $(KERNEL_OBJ).o
EXTRA_CFLAGS += -I$(PWD)/src
include $(PWD)/Unbuckle.makeopts
$(KERNEL_OBJ)-objs += src/kernel/unbuckle.o
$(KERNEL_OBJ)-objs += src/buckets.o
$(KERNEL_OBJ)-objs += src/core.o
$(KERNEL_OBJ)-objs += src/kernel/core.o
$(KERNEL_OBJ)-objs += src/kernel/db/linklist.o
$(KERNEL_OBJ)-objs += src/kernel/db/spooky/spooky_hash.o
$(KERNEL_OBJ)-objs += src/kernel/entry.o
$(KERNEL_OBJ)-objs += src/kernel/net/udpserver.o
$(KERNEL_OBJ)-objs += src/kernel/net/udpserver_low.o
$(KERNEL_OBJ)-objs += src/kernel/net/udpserver_send.o
$(KERNEL_OBJ)-objs += src/net/udpserver.o
$(KERNEL_OBJ)-objs += src/prot/memcached.o
ifeq ($(HASHTABLE_VERSION),KHASH)
UB_C_OPTS += -D HASHTABLE_KHASH
$(KERNEL_OBJ)-objs += src/kernel/db/khash.o
else
UB_C_OPTS += -D HASHTABLE_UTHASH
$(KERNEL_OBJ)-objs += src/kernel/db/uthash.o
endif
KDIR=/lib/modules/$(shell uname -r)/build
EXTRA_CFLAGS += $(UB_C_OPTS)
.PHONY: all user clean
all:
mkdir -p bin/kernel
mkdir -p bin/user
make -C $(KDIR) M=$(PWD) modules
user:
make --file Makefile.user
clean:
find bin/kernel/ -mindepth 1 -delete
find bin/user/ -mindepth 1 -delete
find src/ -name "*.o" -delete
find src/ -name ".*.o.cmd" -delete
rm -Rf .tmp_versions/
rm -f modules.order
rm -f Module.symvers