2 # Makefile for Linux FAT12/FAT16/FAT32(VFAT)/FAT64(ExFAT) filesystem driver.
5 ifneq ($(KERNELRELEASE
),)
6 # call from kernel build system
8 obj-
$(CONFIG_EXFAT_FS
) += exfat.o
10 exfat-objs
:= exfat_core.o exfat_super.o exfat_api.o exfat_blkdev.o exfat_cache.o \
11 exfat_data.o exfat_bitmap.o exfat_nls.o exfat_oal.o exfat_upcase.o
14 # external module build
16 EXTRA_FLAGS
+= -I
$(PWD
)
19 # KDIR is a path to a directory containing kernel source.
20 # It can be specified on the command line passed to make to enable the module to
21 # be built and installed for a kernel other than the one currently running.
22 # By default it is the path to the symbolic link created when
23 # the current kernel's modules were installed, but
24 # any valid path to the directory in which the target kernel's source is located
25 # can be provided on the command line.
27 KDIR ?
= /lib
/modules
/$(shell uname
-r
)/build
28 MDIR ?
= /lib
/modules
/$(shell uname
-r
)
32 export CONFIG_EXFAT_FS
:= m
35 $(MAKE
) -C
$(KDIR
) M
=$(PWD
) modules
38 $(MAKE
) -C
$(KDIR
) M
=$(PWD
) clean
41 $(MAKE
) -C
$(KDIR
) M
=$(PWD
) help
44 rm -f
${MDIR}/kernel
/fs
/exfat
/exfat.ko
45 install -m644
-b
-D exfat.ko
${MDIR}/kernel
/fs
/exfat
/exfat.ko
49 rm -rf
${MDIR}/kernel
/fs
/exfat
54 .PHONY
: all clean install uninstall