summaryrefslogtreecommitdiff
path: root/fs/yaffs2/direct/Makefile
diff options
context:
space:
mode:
authorWilliam Juul <william.juul@datarespons.no>2007-11-15 12:23:57 +0100
committerScott Wood <scottwood@freescale.com>2008-08-12 11:31:19 -0500
commit90ef117b68387d66763291af0117677644166611 (patch)
tree829e4954f6d1b0976734c0d2ef2b2bbd173d7572 /fs/yaffs2/direct/Makefile
parent0e8cc8bd92257da2e1df88cbc985e166e472ce61 (diff)
downloadu-boot-imx-90ef117b68387d66763291af0117677644166611.zip
u-boot-imx-90ef117b68387d66763291af0117677644166611.tar.gz
u-boot-imx-90ef117b68387d66763291af0117677644166611.tar.bz2
Incorporate yaffs2 into U-boot
To use YAFFS2 define CONFIG_YAFFS2 Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'fs/yaffs2/direct/Makefile')
-rw-r--r--fs/yaffs2/direct/Makefile58
1 files changed, 27 insertions, 31 deletions
diff --git a/fs/yaffs2/direct/Makefile b/fs/yaffs2/direct/Makefile
index 6315117..0ee18e5 100644
--- a/fs/yaffs2/direct/Makefile
+++ b/fs/yaffs2/direct/Makefile
@@ -17,50 +17,46 @@
# $Id: Makefile,v 1.15 2007/07/18 19:40:38 charles Exp $
#EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
+include $(TOPDIR)/config.mk
-CFLAGS = -Wall -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2 -g $(EXTRA_COMPILE_FLAGS) -DNO_Y_INLINE
-CFLAGS+= -fstack-check -O0
+LIB = $(obj)libyaffs2.a
-#CFLAGS+= -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
-#CFLAGS+= -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
+COBJS-$(CONFIG_YAFFS2) := \
+ yaffscfg.o yaffs_ecc.o yaffsfs.o yaffs_guts.o yaffs_packedtags1.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o \
+ yaffs_nand.o yaffs_checkptrw.o yaffs_qsort.o yaffs_mtdif.o \
+ yaffs_mtdif2.o
-
-DIRECTTESTOBJS = dtest.o yaffscfg2k.o yaffs_ecc.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
- yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
- yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
- yaffs_checkptrw.o yaffs_qsort.o \
-# yaffs_checkptrwtest.o\
-
-
-BOOTTESTOBJS = bootldtst.o yboot.o yaffs_fileem.o nand_ecc.o
-
-#ALLOBJS = dtest.o nand_ecc.o yaffscfg.o yaffs_fileem.o yaffsfs.o yaffs_ramdisk.o bootldtst.o yboot.o yaffs_ramem2k.o
-
-ALLOBJS = $(DIRECTTESTOBJS) $(BOOTTESTOBJS)
+SRCS := $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y))
SYMLINKS = devextras.h yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffsinterface.h yportenv.h yaffs_tagscompat.c yaffs_tagscompat.h \
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h yaffs_nandemul2k.h \
- yaffs_nand.c yaffs_nand.h \
+ yaffs_nand.c yaffs_nand.h yaffs_mtdif.c yaffs_mtdif.h \
yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
- yaffs_qsort.c yaffs_qsort.h
+ yaffs_qsort.c yaffs_qsort.h yaffs_mtdif2.c yaffs_mtdif2.h
-#all: directtest2k boottest
+# -DCONFIG_YAFFS_NO_YAFFS1
+CFLAGS += -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE -DLINUX_VERSION_CODE=0x20616
-all: directtest2k
+all: $(LIB)
-$(ALLOBJS): %.o: %.c
- gcc -c $(CFLAGS) $< -o $@
+$(LIB): $(obj).depend $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
-$(SYMLINKS):
- ln -s ../$@ $@
+.PHONY: clean distclean
+clean:
+ rm -f $(OBJS)
-directtest2k: $(SYMLINKS) $(DIRECTTESTOBJS)
- gcc -o $@ $(DIRECTTESTOBJS)
+distclean: clean
+ rm -f $(LIB) core *.bak .depend
+#########################################################################
-boottest: $(SYMLINKS) $(BOOTTESTOBJS)
- gcc -o $@ $(BOOTTESTOBJS)
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+sinclude $(obj).depend
+
+#########################################################################
-clean:
- rm -f $(ALLOBJS) core