2009-08-29 12:23:40 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
2012-03-27 14:27:02 +00:00
|
|
|
TLSFLIB_DIR := $(ROOTDIR)/lib/tlsf
|
|
|
|
TLSFLIB_SRC := $(call preprocess, $(TLSFLIB_DIR)/SOURCES)
|
2009-08-29 12:23:40 +00:00
|
|
|
TLSFLIB_OBJ := $(call c2obj, $(TLSFLIB_SRC))
|
2012-03-27 14:27:02 +00:00
|
|
|
TLSFLIB := $(BUILDDIR)/lib/libtlsf.a
|
2009-08-29 12:23:40 +00:00
|
|
|
|
2012-03-27 14:27:02 +00:00
|
|
|
OTHER_SRC += $(TLSFLIB_SRC)
|
|
|
|
INCLUDES += -I$(TLSFLIB_DIR)/src
|
2009-08-29 12:23:40 +00:00
|
|
|
|
2012-03-27 14:27:02 +00:00
|
|
|
TLSFLIBFLAGS = $(CFLAGS) -fstrict-aliasing -ffunction-sections $(SHARED_CFLAGS)
|
2009-08-29 12:23:40 +00:00
|
|
|
|
2012-03-27 14:27:02 +00:00
|
|
|
# Enable statistics in the sim
|
2011-09-07 19:21:57 +00:00
|
|
|
ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim)
|
2012-03-27 14:27:02 +00:00
|
|
|
TLSFLIBFLAGS += -DTLSF_STATISTIC=1
|
2011-09-07 19:21:57 +00:00
|
|
|
endif
|
|
|
|
|
2012-03-27 14:27:02 +00:00
|
|
|
# special rules for tlsf
|
|
|
|
$(BUILDDIR)/lib/tlsf/src/%.o: $(TLSFLIB_DIR)/src/%.c
|
2009-08-29 12:23:40 +00:00
|
|
|
$(SILENT)mkdir -p $(dir $@)
|
2012-03-27 14:27:02 +00:00
|
|
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -c $< -o $@ \
|
|
|
|
-I$(TLSFLIB_DIR)/src $(TLSFLIBFLAGS)
|
|
|
|
|
|
|
|
$(TLSFLIB): $(TLSFLIB_OBJ)
|
|
|
|
$(SILENT)$(shell rm -f $@)
|
|
|
|
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
|