-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (28 loc) · 961 Bytes
/
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
# ksocket project
# BSD-style socket APIs for kernel 2.6 developers
#
# @2007-2008, China
# @[email protected] (MSN Accounts)
#
# This code is licenced under the GPL
# Feel free to contact me if any questions
#
#### tell make that these targets are not actual files
.PHONY: default clean
#### some variable definitions
obj-m := kcache.o
ksocket_tcp_srv-objs := ../ksocket-0.0.2/ksocket.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
#EXTRA_LDFLAGS := -I../../src
EXTRA_LDFLAGS := -I../ksocket-0.0.2/src
ifeq ($(ADDRSAFE),true)
EXTRA_CFLAGS += -DKSOCKET_ADDR_SAFE
endif
#### -C means chdir to KDIR, M means set variable M to working dir
#### so ineffect, this will parse run make w/ the Makefil in /lib/modules/.../build
#### with target "modules" and variable M set to PWD. M must be module!
default:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
rm -rf *.ko *.o *.mod.* .H* .tm* .*cmd Module.symvers Module.markers