1155a670a05e5e22cb7892eeb68a892aade6e1f7
[yaffs2.git] / Makefile
1
2 # YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
3
4 # Copyright (C) 2002-2007 Aleph One Ltd.
5 #   for Toby Churchill Ltd and Brightstar Engineering
6
7 # Created by Charles Manning <charles@aleph1.co.uk>
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2 as
11 # published by the Free Software Foundation.
12
13
14 ifneq ($(KERNELRELEASE),)
15         EXTRA_CFLAGS += -DYAFFS_OUT_OF_TREE
16
17         obj-m := yaffs2.o
18
19         yaffs2-objs := yaffs_mtdif.o yaffs_mtdif2.o
20         yaffs2-objs += yaffs_ecc.o yaffs_fs.o yaffs_guts.o
21         yaffs2-objs += yaffs_packedtags2.o yaffs_qsort.o
22         yaffs2-objs += yaffs_tagscompat.o yaffs_tagsvalidity.o
23         yaffs2-objs += yaffs_checkptrw.o yaffs_nand.o
24
25 else
26         KERNELDIR ?= /lib/modules/$(shell uname -r)/build
27         PWD := $(shell pwd)
28
29 modules default:
30         $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
31
32 mi modules_install:
33         $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
34
35 clean:
36         $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
37 endif