forked from dorimanx/exfat-nofuse
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
71 lines (55 loc) · 1.83 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# Makefile for Linux FAT12/FAT16/FAT32(VFAT)/FAT64(ExFAT) filesystem driver.
#
ifneq ($(KERNELRELEASE),)
# call from kernel build system
obj-$(CONFIG_EXFAT_FS) += exfat_core.o exfat_fs.o
exfat_fs-y := exfat_super.o
exfat_core-y := exfat.o exfat_api.o exfat_blkdev.o exfat_cache.o \
exfat_data.o exfat_global.o exfat_nls.o \
exfat_oal.o exfat_upcase.o exfat_xattr.o
all:
$(MAKE) -C /lib/modules/$(KERNELRELEASE)/build M=$(PWD) modules
clean:
$(MAKE) -C /lib/modules/$(KERNELRELEASE)/build M=$(PWD) clean
else
# external module build
EXTRA_FLAGS += -I$(PWD)
#
# KDIR is a path to a directory containing kernel source.
# It can be specified on the command line passed to make to enable the module to
# be built and installed for a kernel other than the one currently running.
# By default it is the path to the symbolic link created when
# the current kernel's modules were installed, but
# any valid path to the directory in which the target kernel's source is located
# can be provided on the command line.
#
KVER ?= $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
MDIR := /lib/modules/$(KVER)
PWD := $(shell pwd)
KREL := $(shell cd ${KDIR} && make -s kernelrelease)
PWD := $(shell pwd)
export CONFIG_EXFAT_FS := m
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
help:
$(MAKE) -C $(KDIR) M=$(PWD) help
install:all
rm -f ${DESTDIR}${MDIR}/kernel/fs/exfat/exfat.ko
rm -f ${DESTDIR}${MDIR}/kernel/fs/exfat/exfat_fs.ko
rm -f ${DESTDIR}${MDIR}/kernel/fs/exfat/exfat_core.ko
install -m644 -b -D exfat_core.ko ${DESTDIR}${MDIR}/kernel/fs/exfat/exfat_core.ko
install -m644 -b -D exfat_fs.ko ${DESTDIR}${MDIR}/kernel/fs/exfat/exfat_fs.ko
ifeq ($(DESTDIR),)
depmod -a
endif
uninstall:
rm -rf ${DESTDIR}/${MDIR}/kernel/fs/exfat
ifeq ($(DESTDIR),)
depmod -a
endif
endif
.PHONY : all clean install uninstall