2 # This file was originally written to work from the yaffs2 base directory
3 # which required deleting some of the Linux files.
5 # This is now modified to run from the yaffs2/rtems directory and copies in
6 # all files as symbolic links.
9 include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
10 include $(RTEMS_MAKEFILE_PATH)/make/target.cfg
12 INSTALL_BASE = $(RTEMS_MAKEFILE_PATH)/lib
14 BUILDDIR = build-$(RTEMS_BSP)
18 DEPFLAGS = -MT $@ -MD -MP -MF $(basename $@).d
20 GCCFLAGS = -g -I . -B $(INSTALL_BASE) -specs bsp_specs -qrtems
22 CFLAGS += $(DEPFLAGS) $(GCCFLAGS)
24 # Files to be made into local symlinks
59 yaffs_getblockinfo.h \
74 DIRECT_QSORT_SYMLINKS = \
77 ALL_SYMLINKS = $(YCORE_SYMLINKS) $(DIRECT_SYMLINKS) $(DIRECT_QSORT_SYMLINKS)
80 INCLUDES = rtems_yaffs.h \
92 LIB = $(BUILDDIR)/libyaffs2.a
93 LIB_PIECES = yaffs_ecc \
113 rtems_yaffs_os_context \
115 LIB_OBJS = $(LIB_PIECES:%=$(BUILDDIR)/%.o)
116 LIB_DEPS = $(LIB_PIECES:%=$(BUILDDIR)/%.d)
118 all: $(BUILDDIR) $(ALL_SYMLINKS) $(LIB)
120 symlinks:$(ALL_SYMLINKS)
126 ln -s ../direct/$@ $@
128 $(DIRECT_QSORT_SYMLINKS):
129 ln -s ../direct/optional_sort/$@ $@
139 $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
142 rm -rf $(BUILDDIR) $(ALL_SYMLINKS)
145 mkdir -p $(INSTALL_BASE)/include/yaffs
146 install -m 644 $(LIB) $(INSTALL_BASE)
147 install -m 644 $(INCLUDES) $(INSTALL_BASE)/include/yaffs
149 .PHONY: clean install