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
57 yaffs_getblockinfo.h \
72 DIRECT_QSORT_SYMLINKS = \
75 ALL_SYMLINKS = $(YCORE_SYMLINKS) $(DIRECT_SYMLINKS) $(DIRECT_QSORT_SYMLINKS)
78 INCLUDES = rtems_yaffs.h \
90 LIB = $(BUILDDIR)/libyaffs2.a
91 LIB_PIECES = yaffs_ecc \
109 rtems_yaffs_os_context \
111 LIB_OBJS = $(LIB_PIECES:%=$(BUILDDIR)/%.o)
112 LIB_DEPS = $(LIB_PIECES:%=$(BUILDDIR)/%.d)
114 all: $(BUILDDIR) $(ALL_SYMLINKS) $(LIB)
116 symlinks:$(ALL_SYMLINKS)
122 ln -s ../direct/$@ $@
124 $(DIRECT_QSORT_SYMLINKS):
125 ln -s ../direct/optional_sort/$@ $@
135 $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
138 rm -rf $(BUILDDIR) $(ALL_SYMLINKS)
141 mkdir -p $(INSTALL_BASE)/include/yaffs
142 install -m 644 $(LIB) $(INSTALL_BASE)
143 install -m 644 $(INCLUDES) $(INSTALL_BASE)/include/yaffs
145 .PHONY: clean install