mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
tlsf: move to /lib (it's also used by plugins).
Change-Id: I5e37b28c1ce4608d60b036343f280af3311ad490
This commit is contained in:
parent
9f2ee2f21a
commit
c56950ea3a
16 changed files with 26 additions and 27 deletions
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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))
|
||||
TLSFLIB := $(BUILDDIR)/lib/libtlsf.a
|
||||
|
||||
OTHER_SRC += $(TLSFLIB_SRC)
|
||||
INCLUDES += -I$(TLSFLIB_DIR)/src
|
||||
EXTRA_LIBS += $(TLSFLIB)
|
||||
|
||||
TLSFLIBFLAGS = $(CFLAGS) -fstrict-aliasing -ffunction-sections $(SHARED_CFLAGS)
|
||||
|
||||
# Enable statistics in the sim
|
||||
ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim)
|
||||
TLSFLIBFLAGS += -DTLSF_STATISTIC=1
|
||||
endif
|
||||
|
||||
# special rules for tlsf
|
||||
$(BUILDDIR)/lib/tlsf/src/%.o: $(TLSFLIB_DIR)/src/%.c
|
||||
$(SILENT)mkdir -p $(dir $@)
|
||||
$(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
|
||||
|
||||
TLSFLIBFLAGS = $(CODECFLAGS)
|
||||
|
||||
ifdef APP_TYPE
|
||||
TLSFLIBFLAGS += -DTLSF_STATISTIC=1
|
||||
endif
|
||||
|
||||
# Do not use '-ffunction-sections' when compiling sdl-sim
|
||||
ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim)
|
||||
TLSFLIBFLAGS += -ffunction-sections
|
||||
endif
|
||||
|
||||
$(CODECDIR)/lib/tlsf/src/%.o: $(APPSDIR)/codecs/lib/tlsf/src/%.c
|
||||
$(SILENT)mkdir -p $(dir $@)
|
||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
|
||||
-I$(dir $<) $(TLSFLIBFLAGS) -c $< -o $@
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue