summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorRicardo Crudo <ricardo.crudo@gmail.com>2014-05-20 00:19:40 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-05-20 00:19:40 +0200
commit0c5e88be4e64203e8fa00ec8af9a22a1bc805a2a (patch)
tree52de2ddcf0e005d63b34452cb5f14f60e11defc1 /packages
parent7107669b22ebbab36e4c1e494cdb4bb7acf8af5f (diff)
downloadembtoolkit-0c5e88be4e64203e8fa00ec8af9a22a1bc805a2a.tar.gz
embtoolkit-0c5e88be4e64203e8fa00ec8af9a22a1bc805a2a.tar.bz2
embtoolkit-0c5e88be4e64203e8fa00ec8af9a22a1bc805a2a.tar.xz
Packages/Math: add armadillo v4.300.2
Signed-off-by: Ricardo Crudo<ricardo.crudo@gmail.com> Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/math/armadillo/armadillo.kconfig50
-rw-r--r--packages/math/armadillo/armadillo.mk60
-rw-r--r--packages/math/math.kconfig27
-rw-r--r--packages/math/math.mk29
4 files changed, 166 insertions, 0 deletions
diff --git a/packages/math/armadillo/armadillo.kconfig b/packages/math/armadillo/armadillo.kconfig
new file mode 100644
index 0000000..1e0e624
--- /dev/null
+++ b/packages/math/armadillo/armadillo.kconfig
@@ -0,0 +1,50 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2014 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file armadillo.kconfig
+# \brief armadillo.kconfig of Embtoolkit.
+# \author Ricardo Crudo <ricardo.crudo@gmail.com>
+# \date May 2014
+################################################################################
+
+config EMBTK_HAVE_ARMADILLO
+ bool "Have armadillo in target"
+ depends on EMBTK_HAVE_OPENBLAS
+ select EMBTK_GCC_LANGUAGE_CPP
+ help
+ Armadillo is a C++ linear algebra library (matrix maths) aiming towards
+ a good balance between speed and ease of use.
+ The syntax (API) is deliberately similar to Matlab.
+
+choice
+ prompt "armadillo version to use"
+ depends on EMBTK_HAVE_ARMADILLO
+ help
+ armadillo version to use
+
+ config EMBTK_ARMADILLO_VERSION_4_300_2
+ bool "armadillo-4.300.2"
+endchoice
+
+config EMBTK_ARMADILLO_VERSION_STRING
+ string
+ default "4.300.2" if EMBTK_ARMADILLO_VERSION_4_300_2
+
+config EMBTK_ARMADILLO_NEED_PATCH
+ bool
diff --git a/packages/math/armadillo/armadillo.mk b/packages/math/armadillo/armadillo.mk
new file mode 100644
index 0000000..12a5513
--- /dev/null
+++ b/packages/math/armadillo/armadillo.mk
@@ -0,0 +1,60 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2014 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file armadillo.mk
+# \brief armadillo.mk of Embtoolkit.
+# \author Ricardo Crudo <ricardo.crudo@gmail.com>
+# \date May 2014
+################################################################################
+
+ARMADILLO_NAME := armadillo
+ARMADILLO_VERSION := $(call embtk_get_pkgversion,armadillo)
+ARMADILLO_SITE := http://sourceforge.net/projects/arma/files/
+ARMADILLO_PACKAGE := armadillo-$(ARMADILLO_VERSION).tar.gz
+ARMADILLO_SRC_DIR := $(embtk_pkgb)/armadillo-$(ARMADILLO_VERSION)
+ARMADILLO_BUILD_DIR := $(embtk_pkgb)/armadillo-$(ARMADILLO_VERSION)
+
+ARMADILLO_INCLUDES := armadillo*
+ARMADILLO_LIBS := libarmadillo*
+ARMADILLO_SHARES := Armadillo
+
+ARMADILLO_CMAKE_OPTS := "SET(CMAKE_SYSTEM_NAME Linux)\n\
+ SET(CMAKE_C_COMPILER $(TARGETCC))\n\
+ SET(CMAKE_CXX_COMPILER $(TARGETCXX))\n\
+ SET(CMAKE_FIND_ROOT_PATH $(embtk_tools))\n\
+ SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\
+ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY $(embtk_sysroot)/usr/lib)\n\
+ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE $(embtk_sysroot)/usr/include)\n\
+ SET(CMAKE_INSTALL_PREFIX $(embtk_sysroot)/usr)\n"
+
+# FIXME: For some strange reason (probably a bug) is needed run cmake twice
+define embtk_install_armadillo
+ $(call embtk_download_pkg,armadillo)
+ $(call embtk_decompress_pkg,armadillo)
+ rm -rf $(ARMADILLO_BUILD_DIR)/build
+ mkdir $(ARMADILLO_BUILD_DIR)/build
+ printf $(ARMADILLO_CMAKE_OPTS) \
+ > $(ARMADILLO_BUILD_DIR)/build/target.cmake
+ cd $(ARMADILLO_BUILD_DIR)/build && \
+ cmake -DCMAKE_TOOLCHAIN_FILE=target.cmake ..
+ cd $(ARMADILLO_BUILD_DIR)/build && \
+ cmake -DCMAKE_TOOLCHAIN_FILE=target.cmake ..
+ $(MAKE) -C $(ARMADILLO_BUILD_DIR)/build
+ $(MAKE) -C $(ARMADILLO_BUILD_DIR)/build install
+endef
diff --git a/packages/math/math.kconfig b/packages/math/math.kconfig
new file mode 100644
index 0000000..fb4a0fb
--- /dev/null
+++ b/packages/math/math.kconfig
@@ -0,0 +1,27 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2014 GAYE Abdoulaye Walsimou.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file math.kconfig
+# \brief math.kconfig of Embtoolkit
+# \author GAYE Abdoulaye Walsimou <awg@embtoolkit.org>
+# \date May 2014
+################################################################################
+
+# armadillo
+source packages/math/armadillo/armadillo.kconfig
diff --git a/packages/math/math.mk b/packages/math/math.mk
new file mode 100644
index 0000000..84b2fc6
--- /dev/null
+++ b/packages/math/math.mk
@@ -0,0 +1,29 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2014 GAYE Abdoulaye Walsimou.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file math.mk
+# \brief math.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date May 2014
+################################################################################
+
+embtk_pkgincdir := packages/math
+
+# armadillo
+$(call embtk_include_pkg,armadillo)