1 # Makefile rules for building in test framwork
4 # YAFFS: Yet another Flash File System. A NAND-flash specific file system.
6 # Copyright (C) 2003-2010 Aleph One Ltd.
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 # NB Warning this Makefile does not include header dependencies.
18 #EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
20 CFLAGS = -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS_DEFINES_TYPES
21 CFLAGS += -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES
22 CFLAGS += -Wall -g $(EXTRA_COMPILE_FLAGS) -Wstrict-aliasing
23 #CFLAGS += -fno-strict-aliasing
25 CFLAGS += -Wextra -Wpointer-arith
26 #CFLAGS += -DCONFIG_YAFFS_VALGRIND_TEST
28 #CFLAGS+= -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
29 #CFLAGS+= -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
32 COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o yaffs_error.o\
33 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
34 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
35 yaffs_tagscompat.o yaffs_tagsmarshall.o \
36 yaffs_packedtags2.o yaffs_nand.o \
37 yaffs_checkptrw.o yaffs_qsort.o\
38 yaffs_nameval.o yaffs_attribs.o \
39 yaffs_m18_drv.o yaffs_nor_drv.o ynorsim.o \
42 nandsim_file.o nandstore_file.o \
52 ALLOBJS = $(sort $(ALL_UNSORTED_OBJS))
54 YAFFSDIRECTSYMLINKS = \
55 yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
56 yaffsfs.h yaffs_osglue.h ydirectenv.h \
57 yaffscfg.h yaffs_qsort.c \
58 yaffs_nandemul2k.h yaffs_list.h \
61 yaffs_hweight.c yaffs_hweight.h \
63 yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h \
64 yaffs_tagscompat.c yaffs_tagscompat.h \
65 yaffs_tagsmarshall.c yaffs_tagsmarshall.h \
66 yaffs_packedtags1.c yaffs_packedtags1.h \
67 yaffs_packedtags2.c yaffs_packedtags2.h \
68 yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
69 yaffs_checkptrw.h yaffs_checkptrw.c \
70 yaffs_nameval.c yaffs_nameval.h \
71 yaffs_trace.h yaffs_attribs.h \
72 yaffs_allocator.c yaffs_allocator.h \
73 yaffs_yaffs1.c yaffs_yaffs1.h \
74 yaffs_yaffs2.c yaffs_yaffs2.h \
75 yaffs_bitmap.c yaffs_bitmap.h \
76 yaffs_verify.c yaffs_verify.h \
77 yaffs_summary.c yaffs_summary.h
80 FRAMEWORKEXTRASYMLINKS = \
81 yaffscfg2k.c yaffs_fileem2k.c yaffs_fileem2k.h\
82 yaffs_fileem.c yaffs_m18_drv.c yaffs_m18_drv.h \
83 yaffs_nor_drv.c yaffs_nor_drv.h \
84 yaffs_nand_drv.c yaffs_nand_drv.h \
85 yaffs_ramdisk.c yaffs_ramdisk.h yaffs_ramem2k.c \
86 nand_chip.h nanddrv.c nanddrv.h nandsim.c nandsim.h nand_store.h \
87 nandsim_file.c nandsim_file.h nandstore_file.c nandstore_file.h \
88 ynorsim.h ynorsim.c yaffs_osglue.c
90 FRAMEWORK_SOURCES = $(YAFFSDIRECTSYMLINKS) $(FRAMEWORKEXTRASYMLINKS)
93 rm -f $(TARGETS) $(ALLOBJS) core $(FRAMEWORK_SOURCES) $(CLEAN_OBJS)
95 $(YAFFSDIRECTSYMLINKS):
96 ln -s $(YDI_DIR)/$@ $@
99 $(FRAMEWORKEXTRASYMLINKS):
100 ln -s $(YDI_FRAMEWORK_DIR)/$@ $@
103 gcc -c $(CFLAGS) -o $@ $<