3 # NB this is not yet suitable for putting into the kernel tree.
4 # YAFFS: Yet another Flash File System. 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/usr/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
23 ## Change if you are using a cross-compiler
28 COMMONLINKS = yaffs_ecc.c
29 COMMONOBJS = $(COMMONLINKS:.c=.o)
31 MKYAFFSSOURCES = mkyaffsimage.c
32 MKYAFFSIMAGEOBJS = $(MKYAFFSSOURCES:.c=.o)
34 MKYAFFS2SOURCES = mkyaffs2image.c
35 MKYAFFS2LINKS = yaffs_packedtags2.c yaffs_tagsvalidity.c
36 MKYAFFS2IMAGEOBJS = $(MKYAFFS2SOURCES:.c=.o) $(MKYAFFS2LINKS:.c=.o)
38 all: mkyaffsimage mkyaffs2image
40 $(COMMONLINKS) $(MKYAFFSLINKS) $(MKYAFFS2LINKS):
43 $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) : %.o: %.c
44 $(CC) -c $(CFLAGS) $< -o $@
46 mkyaffsimage: $(COMMONOBJS) $(MKYAFFSIMAGEOBJS)
47 $(CC) -o $@ $(COMMONOBJS) $(MKYAFFSIMAGEOBJS)
49 mkyaffs2image: $(COMMONOBJS) $(MKYAFFS2IMAGEOBJS)
50 $(CC) -o $@ $(COMMONOBJS) $(MKYAFFS2IMAGEOBJS)
54 rm -f $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) $(COMMONLINKS) $(MKYAFFSLINKS) $(MKYAFFS2LINKS) mkyaffsimage mkyaffs2image core