3 # NB this is not yet suitable for putting into the kernel tree.
4 # YAFFS: Yet another FFS. A NAND-flash specific file system.
6 # Copyright (C) 2002 Aleph One Ltd.
7 # for Toby Churchill Ltd and Brightstar Engineering
9 # Created by Charles Manning <charles@aleph1.co.uk>
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License version 2 as
13 # published by the Free Software Foundation.
15 ## Change or override KERNELDIR to your kernel
17 KERNELDIR = /usr/src/kernel-headers-2.4.18
19 CFLAGS = -I$(KERNELDIR)/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL
20 CFLAGS+= -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
21 CFLAGS+= -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
24 MKYAFFSOBJS = mkyaffs.o
26 MKYAFFSIMAGEOBJS = mkyaffsimage.o nand_ecc.o
29 all: mkyaffs mkyaffsimage
31 $(MKYAFFSIMAGEOBJS): %.o: %.c
32 gcc -c $(CFLAGS) $< -o $@
34 mkyaffsimage: $(MKYAFFSIMAGEOBJS)
35 gcc -o $@ $(MKYAFFSIMAGEOBJS)
37 $(MKYAFFSOBJS): %.o: %.c
38 gcc -c $(CFLAGS) $< -o $@
40 mkyaffs: $(MKYAFFSOBJS)
41 gcc -o $@ $(MKYAFFSOBJS)
44 ln -s ../nand_ecc.c nand_ecc.c
48 rm -f $(MKYAFFSOBJS) $(MKYAFFSIMAGEOBJS) core