blob: e8bdca201a20ba898c928a3c6de4a3c6074cc09b [file] [log] [blame]
Namjae Jeon9273f3d2020-02-03 21:47:19 +09001# SPDX-License-Identifier: GPL-2.0-or-later
2#
3# Makefile for the linux exFAT filesystem support.
4#
5ifneq ($(KERNELRELEASE),)
6obj-$(CONFIG_EXFAT_FS) += exfat.o
7
8exfat-y := inode.o namei.o dir.o super.o fatent.o cache.o nls.o misc.o \
9 file.o balloc.io
10else
11# Called from external kernel module build
12
13KERNELRELEASE ?= $(shell uname -r)
14KDIR ?= /lib/modules/${KERNELRELEASE}/build
15MDIR ?= /lib/modules/${KERNELRELEASE}
16PWD := $(shell pwd)
17
18export CONFIG_EXFAT_FS := m
19
20all:
21 $(MAKE) -C $(KDIR) M=$(PWD) modules
22
23clean:
24 $(MAKE) -C $(KDIR) M=$(PWD) clean
25
26help:
27 $(MAKE) -C $(KDIR) M=$(PWD) help
28
29install: exfat.ko
30 rm -f ${MDIR}/kernel/fs/exfat/exfat.ko
31 install -m644 -b -D exfat.ko ${MDIR}/kernel/fs/exfat/exfat.ko
32 depmod -aq
33
34uninstall:
35 rm -rf ${MDIR}/kernel/fs/exfat
36 depmod -aq
37
38endif
39
40.PHONY : all clean install uninstal