1 # Makefile rules for building in test framwork
4 # YAFFS: Yet another Flash File System. A NAND-flash specific file system.
6 # Copyright (C) 2002-2018 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 += -DCONFIG_YAFFS_MONITOR_MALLOC
23 CFLAGS += -Wall -g $(EXTRA_COMPILE_FLAGS) -Wstrict-aliasing -Werror
24 #CFLAGS += -fno-strict-aliasing
26 CFLAGS += -Wextra -Wpointer-arith
27 #CFLAGS += -DCONFIG_YAFFS_VALGRIND_TEST
29 #CFLAGS+= -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
30 #CFLAGS+= -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
31 CLEAN_OBJS = emfile-2k-0 emfile-nand emfile-nand128MB
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 \
42 yaffs_nameval.o yaffs_attribs.o \
43 yaffs_m18_drv.o yaffs_nor_drv.o ynorsim.o \
46 yaffs_nandsim_file.o nandsim.o nandsim_file.o nandstore_file.o \
56 ALLOBJS = $(sort $(ALL_UNSORTED_OBJS))
58 YAFFSDIRECTSYMLINKS = \
59 yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
60 yaffsfs.h yaffs_osglue.h ydirectenv.h \
62 yaffs_cache.c yaffs_cache.h\
63 yaffs_nandemul2k.h yaffs_list.h \
66 yaffs_hweight.c yaffs_hweight.h \
67 yaffs_endian.c yaffs_endian.h \
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
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
98 FRAMEWORK_SOURCES = $(YAFFSDIRECTSYMLINKS) $(FRAMEWORKEXTRASYMLINKS)
101 rm -f $(TARGETS) $(ALLOBJS) core $(FRAMEWORK_SOURCES) $(CLEAN_OBJS)
103 $(YAFFSDIRECTSYMLINKS):
104 ln -s $(YDI_DIR)/$@ $@
107 $(FRAMEWORKEXTRASYMLINKS):
108 ln -s $(YDI_FRAMEWORK_DIR)/$@ $@