Namjae Jeon | 9273f3d | 2020-02-03 21:47:19 +0900 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | # |
| 3 | # Makefile for the linux exFAT filesystem support. |
| 4 | # |
| 5 | ifneq ($(KERNELRELEASE),) |
| 6 | obj-$(CONFIG_EXFAT_FS) += exfat.o |
| 7 | |
| 8 | exfat-y := inode.o namei.o dir.o super.o fatent.o cache.o nls.o misc.o \ |
Namjae Jeon | f53d47c | 2020-02-04 09:18:10 +0900 | [diff] [blame] | 9 | file.o balloc.o |
Namjae Jeon | 9273f3d | 2020-02-03 21:47:19 +0900 | [diff] [blame] | 10 | else |
| 11 | # Called from external kernel module build |
| 12 | |
| 13 | KERNELRELEASE ?= $(shell uname -r) |
| 14 | KDIR ?= /lib/modules/${KERNELRELEASE}/build |
| 15 | MDIR ?= /lib/modules/${KERNELRELEASE} |
| 16 | PWD := $(shell pwd) |
| 17 | |
| 18 | export CONFIG_EXFAT_FS := m |
| 19 | |
| 20 | all: |
| 21 | $(MAKE) -C $(KDIR) M=$(PWD) modules |
| 22 | |
| 23 | clean: |
| 24 | $(MAKE) -C $(KDIR) M=$(PWD) clean |
| 25 | |
| 26 | help: |
| 27 | $(MAKE) -C $(KDIR) M=$(PWD) help |
| 28 | |
| 29 | install: 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 | |
| 34 | uninstall: |
| 35 | rm -rf ${MDIR}/kernel/fs/exfat |
| 36 | depmod -aq |
| 37 | |
| 38 | endif |
| 39 | |
Aman Gupta Karmani | 51fb878 | 2021-10-11 15:38:21 -0700 | [diff] [blame] | 40 | .PHONY : all clean install uninstall |