blob: b1acf144466a242f05ac9895b9d6311416d06d33 [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 \
Namjae Jeonf53d47c2020-02-04 09:18:10 +09009 file.o balloc.o
Namjae Jeon9273f3d2020-02-03 21:47:19 +090010else
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
Aman Gupta Karmani51fb8782021-10-11 15:38:21 -070040.PHONY : all clean install uninstall