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
61 yaffs_getblockinfo.h \
76 DIRECT_QSORT_SYMLINKS = \
79 ALL_SYMLINKS = $(YCORE_SYMLINKS) $(DIRECT_SYMLINKS) $(DIRECT_QSORT_SYMLINKS)
82 INCLUDES = rtems_yaffs.h \
94 LIB = $(BUILDDIR)/libyaffs2.a
95 LIB_PIECES = yaffs_ecc \
116 rtems_yaffs_os_context \
118 LIB_OBJS = $(LIB_PIECES:%=$(BUILDDIR)/%.o)
119 LIB_DEPS = $(LIB_PIECES:%=$(BUILDDIR)/%.d)
121 all: $(BUILDDIR) $(ALL_SYMLINKS) $(LIB)
123 symlinks:$(ALL_SYMLINKS)
129 ln -s ../direct/$@ $@
131 $(DIRECT_QSORT_SYMLINKS):
132 ln -s ../direct/optional_sort/$@ $@
142 $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
145 rm -rf $(BUILDDIR) $(ALL_SYMLINKS)
148 mkdir -p $(INSTALL_BASE)/include/yaffs
149 install -m 644 $(LIB) $(INSTALL_BASE)
150 install -m 644 $(INCLUDES) $(INSTALL_BASE)/include/yaffs
152 .PHONY: clean install