summaryrefslogtreecommitdiff
path: root/Makefile
blob: db1b5c21e9dfe8b3a1389da1f2b18e1b67ec327e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Main Makefile for out-of-tree yaffs2 .ko building
#
# You can make two flavours of the .ko
#  make YAFFS_CURRENT=1  : makes yaffs2.ko using the current version code
#  make                  : makes yaffs2multi.ko using the multi-version code
#
# YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
#
# Copyright (C) 2002-2010 Aleph One Ltd.
#   for Toby Churchill Ltd and Brightstar Engineering
#
# Created by Charles Manning <charles@aleph1.co.uk>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.

ifdef YAFFS_CURRENT
	YAFFS_O := yaffs2.o
else
	YAFFS_O := yaffs2multi.o
endif

ifneq ($(KERNELRELEASE),)
	EXTRA_CFLAGS += -DYAFFS_OUT_OF_TREE

	obj-m := $(YAFFS_O)

	yaffs2-objs := yaffs_mtdif.o yaffs_mtdif2_single.o
	yaffs2-objs += yaffs_mtdif1_single.o yaffs_packedtags1.o
	yaffs2-objs += yaffs_ecc.o yaffs_vfs_single.o yaffs_guts.o
	yaffs2-objs += yaffs_packedtags2.o
	yaffs2-objs += yaffs_tagscompat.o
	yaffs2-objs += yaffs_checkptrw.o yaffs_nand.o
	yaffs2-objs += yaffs_checkptrw.o yaffs_nand.o yaffs_nameval.o
	yaffs2-objs += yaffs_allocator.o yaffs_bitmap.o yaffs_attribs.o
	yaffs2-objs += yaffs_yaffs1.o
	yaffs2-objs += yaffs_yaffs2.o
	yaffs2-objs += yaffs_verify.o
	yaffs2-objs += yaffs_summary.o

	yaffs2multi-objs := yaffs_mtdif.o yaffs_mtdif2_multi.o
	yaffs2multi-objs += yaffs_mtdif1_multi.o yaffs_packedtags1.o
	yaffs2multi-objs += yaffs_ecc.o yaffs_vfs_multi.o yaffs_guts.o
	yaffs2multi-objs += yaffs_packedtags2.o
	yaffs2multi-objs += yaffs_tagscompat.o
	yaffs2multi-objs += yaffs_checkptrw.o yaffs_nand.o
	yaffs2multi-objs += yaffs_checkptrw.o yaffs_nand.o yaffs_nameval.o
	yaffs2multi-objs += yaffs_allocator.o yaffs_bitmap.o yaffs_attribs.o
	yaffs2multi-objs += yaffs_yaffs1.o
	yaffs2multi-objs += yaffs_yaffs2.o
	yaffs2multi-objs += yaffs_verify.o
	yaffs2multi-objs += yaffs_summary.o

else
	KERNELDIR ?= /lib/modules/$(shell uname -r)/build
	PWD := $(shell pwd)

modules default:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules

mi modules_install:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install

clean:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
endif