New yaffs2_image_maker tool to work with 4kB pages - still under test
[yaffs2.git] / direct / test-framework / FrameworkRules.mk
1 # Makefile rules for building in test framwork
2 #
3 #
4 # YAFFS: Yet another Flash File System. A NAND-flash specific file system.
5 #
6 # Copyright (C) 2002-2018 Aleph One Ltd.
7 #
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 # NB Warning this Makefile does not include header dependencies.
16 #
17
18 #EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
19
20 CFLAGS =      -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_YAFFS2  -DCONFIG_YAFFS_DEFINES_TYPES
21 CFLAGS +=     -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES
22 CFLAGS +=     -DCONFIG_YAFFS_MONITOR_MALLOC
23 CFLAGS +=    -Wall -g $(EXTRA_COMPILE_FLAGS) -Wstrict-aliasing -Werror
24 #CFLAGS +=    -fno-strict-aliasing
25 CFLAGS +=    -O0
26 CFLAGS +=    -Wextra -Wpointer-arith
27 #CFLAGS +=    -DCONFIG_YAFFS_VALGRIND_TEST
28
29 #CFLAGS+=   -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
30 #CFLAGS+=   -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
31
32
33 COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o yaffs_error.o\
34                  yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
35                  yaffs_flexible_file_sim.o \
36                  yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
37                  yaffs_tagscompat.o yaffs_tagsmarshall.o \
38                  yaffs_packedtags2.o yaffs_nand.o \
39                  yaffs_cache.o \
40                  yaffs_checkptrw.o  \
41                  yaffs_endian.o \
42                  yaffs_nameval.o yaffs_attribs.o \
43                  yaffs_m18_drv.o  yaffs_nor_drv.o ynorsim.o \
44                  yaffs_nand_drv.o \
45                  nanddrv.o \
46                  yaffs_nandsim_file.o nandsim.o nandsim_file.o nandstore_file.o \
47                  yaffs_allocator.o \
48                  yaffs_bitmap.o \
49                  yaffs_yaffs1.o \
50                  yaffs_yaffs2.o \
51                  yaffs_verify.o \
52                  yaffs_summary.o
53
54
55
56 ALLOBJS = $(sort $(ALL_UNSORTED_OBJS))
57
58 YAFFSDIRECTSYMLINKS =  \
59           yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
60           yaffsfs.h yaffs_osglue.h ydirectenv.h \
61           yaffscfg.h \
62           yaffs_cache.c yaffs_cache.h\
63           yaffs_nandemul2k.h yaffs_list.h \
64           yaffs_attribs.c \
65           yportenv.h \
66           yaffs_hweight.c yaffs_hweight.h \
67           yaffs_endian.c yaffs_endian.h \
68           yaffs_error.c \
69           yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h \
70           yaffs_tagscompat.c yaffs_tagscompat.h \
71           yaffs_tagsmarshall.c yaffs_tagsmarshall.h \
72           yaffs_packedtags1.c yaffs_packedtags1.h \
73           yaffs_packedtags2.c yaffs_packedtags2.h  \
74           yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
75           yaffs_checkptrw.h yaffs_checkptrw.c \
76           yaffs_nameval.c yaffs_nameval.h \
77           yaffs_trace.h yaffs_attribs.h \
78           yaffs_allocator.c yaffs_allocator.h \
79           yaffs_yaffs1.c yaffs_yaffs1.h \
80           yaffs_yaffs2.c yaffs_yaffs2.h \
81           yaffs_bitmap.c yaffs_bitmap.h \
82           yaffs_verify.c yaffs_verify.h \
83           yaffs_summary.c yaffs_summary.h
84
85
86 FRAMEWORKEXTRASYMLINKS = \
87                 yaffscfg2k.c yaffs_fileem2k.c yaffs_fileem2k.h\
88                 yaffs_fileem.c yaffs_m18_drv.c yaffs_m18_drv.h \
89                 yaffs_flexible_file_sim.c yaffs_flexible_file_sim.h \
90                 yaffs_nor_drv.c yaffs_nor_drv.h \
91                 yaffs_nand_drv.c yaffs_nand_drv.h \
92                 yaffs_ramdisk.c yaffs_ramdisk.h yaffs_ramem2k.c \
93                 nand_chip.h nanddrv.c nanddrv.h nandsim.c nandsim.h nand_store.h \
94                 nandsim_file.c nandsim_file.h nandstore_file.c nandstore_file.h \
95                 yaffs_nandsim_file.c yaffs_nandsim_file.h \
96                 ynorsim.h ynorsim.c yaffs_osglue.c
97
98 FRAMEWORK_SOURCES = $(YAFFSDIRECTSYMLINKS) $(FRAMEWORKEXTRASYMLINKS)
99
100 clean:
101         rm -f $(TARGETS) $(ALLOBJS) core $(FRAMEWORK_SOURCES) $(CLEAN_OBJS)
102
103 $(YAFFSDIRECTSYMLINKS):
104         ln -s $(YDI_DIR)/$@ $@
105
106
107 $(FRAMEWORKEXTRASYMLINKS):
108         ln -s $(YDI_FRAMEWORK_DIR)/$@ $@
109
110 $(ALLOBJS): %.o: %.c
111         gcc -c $(CFLAGS)   -o $@ $<