From 279c4a33e1b9ff0b38c8a7c33fefafe2e74f29d9 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Tue, 19 May 2015 08:29:32 +0200 Subject: [PATCH] pkg/cmsis-dsp: Add package for CMSIS DSP library --- pkg/cmsis-dsp/Makefile | 34 ++++++++++++++++++++++++++++++++++ pkg/cmsis-dsp/Makefile.include | 1 + pkg/cmsis-dsp/README.md | 1 + 3 files changed, 36 insertions(+) create mode 100644 pkg/cmsis-dsp/Makefile create mode 100644 pkg/cmsis-dsp/Makefile.include create mode 100644 pkg/cmsis-dsp/README.md diff --git a/pkg/cmsis-dsp/Makefile b/pkg/cmsis-dsp/Makefile new file mode 100644 index 000000000..14920ead5 --- /dev/null +++ b/pkg/cmsis-dsp/Makefile @@ -0,0 +1,34 @@ +PKG_NAME=cmsis-dsp +PKG_URL=https://github.com/gebart/CMSIS-DSP.git +PKG_VERSION=v1.4.5-riot1 +PKG_DIR=$(CURDIR)/$(PKG_NAME) + +ifneq ($(RIOTBASE),) +include $(RIOTBASE)/Makefile.base +endif + +.PHONY: all clean patch distclean + +all: $(PKG_DIR)/Makefile + $(MAKE) -C $(CURDIR)/$(PKG_NAME) + +$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config + @ + +$(PKG_DIR)/.git/config: + test -d "$(PKG_DIR)" || git clone "$(PKG_URL)" "$(PKG_DIR)"; \ + cd "$(PKG_DIR)" && git checkout -f "$(PKG_VERSION)" + +$(CURDIR)/$(PKG_NAME) $(PKG_NAME): + # Get PKG_VERSION of package from PKG_URL + git clone '$(PKG_URL)' '$(PKG_NAME)' && cd '$(PKG_NAME)' && git reset --hard '$(PKG_VERSION)' + +clean:: + @echo "Cleaning up $(PKG_NAME) package..." + @-cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \ + git clean -x -f && \ + git am --abort && \ + git reset --hard "$(PKG_VERSION)" + +distclean:: + rm -rf "$(PKG_DIR)" diff --git a/pkg/cmsis-dsp/Makefile.include b/pkg/cmsis-dsp/Makefile.include new file mode 100644 index 000000000..8840a328a --- /dev/null +++ b/pkg/cmsis-dsp/Makefile.include @@ -0,0 +1 @@ +INCLUDES += -I$(RIOTBASE)/pkg/cmsis-dsp/cmsis-dsp/include diff --git a/pkg/cmsis-dsp/README.md b/pkg/cmsis-dsp/README.md new file mode 100644 index 000000000..ad0392fa9 --- /dev/null +++ b/pkg/cmsis-dsp/README.md @@ -0,0 +1 @@ +Since there is no official public repository for the CMSIS-DSP library, we are using our own repo.