Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1215 from Kijewski/tlsf
Add TLSF (two level segregated fit) PKG
- Loading branch information
Showing
4 changed files
with
679 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/tlsf-*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
PKG_NAME = tlsf | ||
PKG_VERSION = 3.0 | ||
PKG_FILE = tlsf-$(PKG_VERSION).zip | ||
PKG_URL = http://tlsf.baisoku.org/$(PKG_FILE) | ||
|
||
ifeq (, $(UNZIP)) | ||
ifeq (0, $(shell which unzip 2>&1 > /dev/null ; echo $$?)) | ||
UNZIP := $(shell which unzip) | ||
else | ||
ifeq (0, $(shell which 7z 2>&1 > /dev/null ; echo $$?)) | ||
UNZIP := $(shell which 7z) x | ||
else | ||
$(error "Neither unzip nor 7z is installed.") | ||
endif | ||
endif | ||
endif | ||
|
||
.PHONY: all clean patch reset | ||
|
||
all: $(BINDIR)$(PKG_NAME).a | ||
|
||
$(BINDIR)$(PKG_NAME).a: $(BINDIR)$(PKG_NAME)-src/Makefile | ||
$(AD)make -C $(<D) | ||
|
||
$(BINDIR)$(PKG_NAME)-src/Makefile: $(CURDIR)/$(PKG_FILE) $(CURDIR)/patch.txt | ||
@rm -rf $(@D) | ||
@mkdir -p $(@D) | ||
$(AD)cd $(@D) && $(UNZIP) $(CURDIR)/$(PKG_FILE) | ||
$(AD)cd $(@D) && patch --binary -p0 -N -i $(CURDIR)/patch.txt | ||
|
||
$(CURDIR)/$(PKG_FILE): | ||
$(AD)wget -nv -c -O $@ $(PKG_URL) | ||
|
||
clean:: | ||
rm -rf $(BINDIR)$(PKG_NAME)-src/ | ||
|
||
distclean:: clean | ||
rm -f $(CURDIR)/$(PKG_FILE) | ||
|
||
Makefile.include: | ||
@true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INCLUDES += -I$(BINDIR)tlsf-src |
Oops, something went wrong.