summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-03-27 16:27:02 +0200
committerThomas Martitz <kugel@rockbox.org>2012-03-28 23:02:39 +0200
commitc56950ea3a9e0244461ce445f25bd7a80c8f7199 (patch)
tree6fb9547aebb230ec15b26db11867a4072d2a6d7b
parent9f2ee2f21abec56108dfb135eaeba5f416f1eb12 (diff)
downloadrockbox-c56950ea3a9e0244461ce445f25bd7a80c8f7199.zip
rockbox-c56950ea3a9e0244461ce445f25bd7a80c8f7199.tar.gz
rockbox-c56950ea3a9e0244461ce445f25bd7a80c8f7199.tar.bz2
rockbox-c56950ea3a9e0244461ce445f25bd7a80c8f7199.tar.xz
tlsf: move to /lib (it's also used by plugins).
Change-Id: I5e37b28c1ce4608d60b036343f280af3311ad490
-rw-r--r--apps/codecs/codecs.make5
-rw-r--r--apps/codecs/libtremor/oggmalloc.c2
-rw-r--r--apps/codecs/vorbis.c2
-rw-r--r--apps/plugins/mikmod/mikmod_supp.h2
-rw-r--r--apps/plugins/pdbox/pdbox.h2
-rw-r--r--apps/plugins/plugins.make2
-rw-r--r--lib/tlsf/COPYING (renamed from apps/codecs/lib/tlsf/COPYING)0
-rw-r--r--lib/tlsf/Changelog (renamed from apps/codecs/lib/tlsf/Changelog)0
-rw-r--r--lib/tlsf/README (renamed from apps/codecs/lib/tlsf/README)0
-rw-r--r--lib/tlsf/SOURCES (renamed from apps/codecs/lib/tlsf/SOURCES)0
-rw-r--r--lib/tlsf/TODO (renamed from apps/codecs/lib/tlsf/TODO)0
-rw-r--r--lib/tlsf/libtlsf.make (renamed from apps/codecs/lib/tlsf/libtlsf.make)33
-rw-r--r--lib/tlsf/src/target.h (renamed from apps/codecs/lib/tlsf/src/target.h)0
-rw-r--r--lib/tlsf/src/tlsf.c (renamed from apps/codecs/lib/tlsf/src/tlsf.c)0
-rw-r--r--lib/tlsf/src/tlsf.h (renamed from apps/codecs/lib/tlsf/src/tlsf.h)0
-rw-r--r--tools/root.make1
16 files changed, 24 insertions, 25 deletions
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make
index 3771301..605d8a3 100644
--- a/apps/codecs/codecs.make
+++ b/apps/codecs/codecs.make
@@ -14,15 +14,12 @@ OTHER_SRC += $(CODECS_SRC)
CODECS := $(CODECS_SRC:.c=.codec)
CODECS := $(subst $(ROOTDIR),$(BUILDDIR),$(CODECS))
-# TLSF memory allocator library
-include $(APPSDIR)/codecs/lib/tlsf/libtlsf.make
-
# the codec helper library
include $(APPSDIR)/codecs/lib/libcodec.make
OTHER_INC += -I$(APPSDIR)/codecs/lib
# extra libraries
-CODEC_LIBS := $(EXTRA_LIBS) $(TLSFLIB) $(CODECLIB)
+CODEC_LIBS := $(EXTRA_LIBS) $(CODECLIB)
# the codec libraries
include $(APPSDIR)/codecs/demac/libdemac.make
diff --git a/apps/codecs/libtremor/oggmalloc.c b/apps/codecs/libtremor/oggmalloc.c
index dd7fd5b..783e0f7 100644
--- a/apps/codecs/libtremor/oggmalloc.c
+++ b/apps/codecs/libtremor/oggmalloc.c
@@ -1,5 +1,5 @@
#include "os_types.h"
-#include "../lib/tlsf/src/tlsf.h"
+#include <tlsf.h>
#if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS)
#include <setjmp.h>
diff --git a/apps/codecs/vorbis.c b/apps/codecs/vorbis.c
index 7004913..944dd6d 100644
--- a/apps/codecs/vorbis.c
+++ b/apps/codecs/vorbis.c
@@ -23,7 +23,7 @@
#include "libtremor/ivorbisfile.h"
#include "libtremor/ogg.h"
#ifdef SIMULATOR
-#include "lib/tlsf/src/tlsf.h"
+#include <tlsf.h>
#endif
CODEC_HEADER
diff --git a/apps/plugins/mikmod/mikmod_supp.h b/apps/plugins/mikmod/mikmod_supp.h
index 1b6bd76..c76c283 100644
--- a/apps/plugins/mikmod/mikmod_supp.h
+++ b/apps/plugins/mikmod/mikmod_supp.h
@@ -1,7 +1,7 @@
#include <string.h>
#include "plugin.h"
#include "inttypes.h"
-#include "codecs/lib/tlsf/src/tlsf.h"
+#include <tlsf.h>
#ifndef MIKMOD_SUPP_H
#define MIKMOD_SUPP_H
diff --git a/apps/plugins/pdbox/pdbox.h b/apps/plugins/pdbox/pdbox.h
index b53e15f..ddc6ed2 100644
--- a/apps/plugins/pdbox/pdbox.h
+++ b/apps/plugins/pdbox/pdbox.h
@@ -23,7 +23,7 @@
#define PDBOX_H
/* Use TLSF. */
-#include "codecs/lib/tlsf/src/tlsf.h"
+#include <tlsf.h>
/* Pure Data */
#include "PDa/src/m_pd.h"
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make
index 67b0d83..b80523d 100644
--- a/apps/plugins/plugins.make
+++ b/apps/plugins/plugins.make
@@ -53,7 +53,7 @@ else
PLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS)
endif
-PLUGIN_LIBS := $(EXTRA_LIBS) $(TLSFLIB) $(PLUGINLIB) $(PLUGINBITMAPLIB)
+PLUGIN_LIBS := $(EXTRA_LIBS) $(PLUGINLIB) $(PLUGINBITMAPLIB)
# include <dir>.make from each subdir (yay!)
$(foreach dir,$(PLUGINSUBDIRS),$(eval include $(dir)/$(notdir $(dir)).make))
diff --git a/apps/codecs/lib/tlsf/COPYING b/lib/tlsf/COPYING
index 78fdbdc..78fdbdc 100644
--- a/apps/codecs/lib/tlsf/COPYING
+++ b/lib/tlsf/COPYING
diff --git a/apps/codecs/lib/tlsf/Changelog b/lib/tlsf/Changelog
index 0cdb34a..0cdb34a 100644
--- a/apps/codecs/lib/tlsf/Changelog
+++ b/lib/tlsf/Changelog
diff --git a/apps/codecs/lib/tlsf/README b/lib/tlsf/README
index d755905..d755905 100644
--- a/apps/codecs/lib/tlsf/README
+++ b/lib/tlsf/README
diff --git a/apps/codecs/lib/tlsf/SOURCES b/lib/tlsf/SOURCES
index eb9d937..eb9d937 100644
--- a/apps/codecs/lib/tlsf/SOURCES
+++ b/lib/tlsf/SOURCES
diff --git a/apps/codecs/lib/tlsf/TODO b/lib/tlsf/TODO
index d7c07b8..d7c07b8 100644
--- a/apps/codecs/lib/tlsf/TODO
+++ b/lib/tlsf/TODO
diff --git a/apps/codecs/lib/tlsf/libtlsf.make b/lib/tlsf/libtlsf.make
index 2072a45..cb61a5c 100644
--- a/apps/codecs/lib/tlsf/libtlsf.make
+++ b/lib/tlsf/libtlsf.make
@@ -7,27 +7,28 @@
# $Id$
#
-TLSFLIB := $(CODECDIR)/libtlsf.a
-TLSFLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/lib/tlsf/SOURCES)
+TLSFLIB_DIR := $(ROOTDIR)/lib/tlsf
+TLSFLIB_SRC := $(call preprocess, $(TLSFLIB_DIR)/SOURCES)
TLSFLIB_OBJ := $(call c2obj, $(TLSFLIB_SRC))
-OTHER_SRC += $(TLSFLIB_SRC)
+TLSFLIB := $(BUILDDIR)/lib/libtlsf.a
-$(TLSFLIB): $(TLSFLIB_OBJ)
- $(SILENT)$(shell rm -f $@)
- $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
+OTHER_SRC += $(TLSFLIB_SRC)
+INCLUDES += -I$(TLSFLIB_DIR)/src
+EXTRA_LIBS += $(TLSFLIB)
-TLSFLIBFLAGS = $(CODECFLAGS)
+TLSFLIBFLAGS = $(CFLAGS) -fstrict-aliasing -ffunction-sections $(SHARED_CFLAGS)
-ifdef APP_TYPE
- TLSFLIBFLAGS += -DTLSF_STATISTIC=1
-endif
-
-# Do not use '-ffunction-sections' when compiling sdl-sim
+# Enable statistics in the sim
ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim)
- TLSFLIBFLAGS += -ffunction-sections
+ TLSFLIBFLAGS += -DTLSF_STATISTIC=1
endif
-$(CODECDIR)/lib/tlsf/src/%.o: $(APPSDIR)/codecs/lib/tlsf/src/%.c
+# special rules for tlsf
+$(BUILDDIR)/lib/tlsf/src/%.o: $(TLSFLIB_DIR)/src/%.c
$(SILENT)mkdir -p $(dir $@)
- $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
- -I$(dir $<) $(TLSFLIBFLAGS) -c $< -o $@
+ $(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
diff --git a/apps/codecs/lib/tlsf/src/target.h b/lib/tlsf/src/target.h
index 1afd62a..1afd62a 100644
--- a/apps/codecs/lib/tlsf/src/target.h
+++ b/lib/tlsf/src/target.h
diff --git a/apps/codecs/lib/tlsf/src/tlsf.c b/lib/tlsf/src/tlsf.c
index 87f8d26..87f8d26 100644
--- a/apps/codecs/lib/tlsf/src/tlsf.c
+++ b/lib/tlsf/src/tlsf.c
diff --git a/apps/codecs/lib/tlsf/src/tlsf.h b/lib/tlsf/src/tlsf.h
index 4feb5c4..4feb5c4 100644
--- a/apps/codecs/lib/tlsf/src/tlsf.h
+++ b/lib/tlsf/src/tlsf.h
diff --git a/tools/root.make b/tools/root.make
index 4a1aaaf..51886a0 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -70,6 +70,7 @@ ifeq (,$(findstring checkwps,$(APP_TYPE)))
include $(ROOTDIR)/apps/bitmaps/bitmaps.make
ifeq (,$(findstring bootloader,$(APPSDIR)))
include $(ROOTDIR)/lib/skin_parser/skin_parser.make
+ include $(ROOTDIR)/lib/tlsf/libtlsf.make
endif
endif
endif