forked from namjaejeon/ksmbd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 1.42 KB
/
Copy pathMakefile
File metadata and controls
52 lines (41 loc) · 1.42 KB
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
50
51
52
ifneq ($(KERNELRELEASE),)
# For kernel build
# CONFIG_SMB_SERVER_SMBDIRECT is supported in the kernel above 4.12 version.
SMBDIRECT_SUPPORTED = $(shell [ $(VERSION) -gt 4 -o \( $(VERSION) -eq 4 -a \
$(PATCHLEVEL) -gt 12 \) ] && echo y)
ifeq "$(CONFIG_SMB_SERVER_SMBDIRECT)" "y"
ifneq "$(call SMBDIRECT_SUPPORTED)" "y"
$(error CONFIG_SMB_SERVER_SMBDIRECT is supported in the kernel above 4.12 version)
endif
endif
obj-$(CONFIG_SMB_SERVER) += smbd.o
smbd-y := unicode.o auth.o vfs.o vfs_cache.o \
misc.o oplock.o netmisc.o \
mgmt/smbd_ida.o mgmt/user_config.o mgmt/share_config.o \
mgmt/tree_connect.o mgmt/user_session.o smb_common.o \
buffer_pool.o transport_tcp.o transport_ipc.o server.o \
connection.o crypto_ctx.o smbd_work.o
smbd-y += smb2pdu.o smb2ops.o smb2misc.o asn1.o
smbd-$(CONFIG_SMB_INSECURE_SERVER) += smb1pdu.o smb1ops.o smb1misc.o
smbd-$(CONFIG_SMB_SERVER_SMBDIRECT) += transport_rdma.o
else
# For external module build
EXTRA_FLAGS += -I$(PWD)
KDIR ?= /lib/modules/$(shell uname -r)/build
MDIR ?= /lib/modules/$(shell uname -r)
PWD := $(shell pwd)
PWD := $(shell pwd)
export CONFIG_SMB_SERVER := m
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
install: smbd.ko
rm -f ${MDIR}/kernel/fs/smbd/smbd.ko
install -m644 -b -D smbd.ko ${MDIR}/kernel/fs/smbd/smbd.ko
depmod -a
uninstall:
rm -rf ${MDIR}/kernel/fs/smbd
depmod -a
endif
.PHONY : all clean install uninstall