Mercurial > yaffs-ecoscentric
annotate utils/Makefile @ 199:4551d577f9bb
Adding fsx test to yaffs direct
| author | charles |
|---|---|
| date | Tue, 16 Oct 2007 01:45:05 +0100 |
| parents | e6e78e317308 |
| children |
| rev | line source |
|---|---|
| 99 | 1 #Makefile for mkyaffs |
| 2 # | |
| 3 # NB this is not yet suitable for putting into the kernel tree. | |
| 179 | 4 # YAFFS: Yet another Flash File System. A NAND-flash specific file system. |
| 99 | 5 # |
| 6 # Copyright (C) 2002 Aleph One Ltd. | |
| 7 # for Toby Churchill Ltd and Brightstar Engineering | |
| 8 # | |
| 9 # Created by Charles Manning <charles@aleph1.co.uk> | |
| 10 # | |
| 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. | |
| 14 | |
| 15 ## Change or override KERNELDIR to your kernel | |
| 16 | |
| 17 #KERNELDIR = /usr/src/kernel-headers-2.4.18 | |
| 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 | |
| 22 | |
| 23 ## Change if you are using a cross-compiler | |
| 24 MAKETOOLS = | |
| 25 | |
| 26 CC=$(MAKETOOLS)gcc | |
| 27 | |
|
104
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
28 COMMONLINKS = yaffs_ecc.c |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
29 COMMONOBJS = $(COMMONLINKS:.c=.o) |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
30 |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
31 MKYAFFSSOURCES = mkyaffsimage.c |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
32 MKYAFFSIMAGEOBJS = $(MKYAFFSSOURCES:.c=.o) |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
33 |
| 99 | 34 MKYAFFS2SOURCES = mkyaffs2image.c |
|
104
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
35 MKYAFFS2LINKS = yaffs_packedtags2.c yaffs_tagsvalidity.c |
| 99 | 36 MKYAFFS2IMAGEOBJS = $(MKYAFFS2SOURCES:.c=.o) $(MKYAFFS2LINKS:.c=.o) |
| 37 | |
|
104
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
38 all: mkyaffsimage mkyaffs2image |
| 99 | 39 |
|
104
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
40 $(COMMONLINKS) $(MKYAFFSLINKS) $(MKYAFFS2LINKS): |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
41 ln -s ../$@ $@ |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
42 |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
43 $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) : %.o: %.c |
| 99 | 44 $(CC) -c $(CFLAGS) $< -o $@ |
| 45 | |
|
104
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
46 mkyaffsimage: $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
47 $(CC) -o $@ $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) |
| 99 | 48 |
|
104
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
49 mkyaffs2image: $(COMMONOBJS) $(MKYAFFS2IMAGEOBJS) |
|
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
50 $(CC) -o $@ $(COMMONOBJS) $(MKYAFFS2IMAGEOBJS) |
| 99 | 51 |
| 52 | |
| 53 clean: | |
|
104
f3540e75e879
Add mkyaffsimage to yaffs2 module, some further "make clean" cleanups.
tpoynor
parents:
99
diff
changeset
|
54 rm -f $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) $(COMMONLINKS) $(MKYAFFSLINKS) $(MKYAFFS2LINKS) mkyaffsimage mkyaffs2image core |
