diff options
author | Ricardo Crudo <ricardo.crudo@gmail.com> | 2014-05-18 23:19:15 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2014-05-18 23:19:15 +0200 |
commit | aa14dffe03eeaaf2355330b74c16ec254a1a75f1 (patch) | |
tree | 6029f42b29bb07ad1e8da98ddc66058bf785bb2c /packages/development | |
parent | f61a1ce48a1425feb9e0474c27e96ad93850db3b (diff) | |
download | embtoolkit-aa14dffe03eeaaf2355330b74c16ec254a1a75f1.tar.gz embtoolkit-aa14dffe03eeaaf2355330b74c16ec254a1a75f1.tar.bz2 embtoolkit-aa14dffe03eeaaf2355330b74c16ec254a1a75f1.tar.xz |
Packages/development: New OpenBLAS
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages/development')
-rw-r--r-- | packages/development/development.kconfig | 3 | ||||
-rw-r--r-- | packages/development/development.mk | 3 | ||||
-rw-r--r-- | packages/development/openblas/openblas.kconfig | 57 | ||||
-rw-r--r-- | packages/development/openblas/openblas.mk | 66 |
4 files changed, 129 insertions, 0 deletions
diff --git a/packages/development/development.kconfig b/packages/development/development.kconfig index fb840a4..6753e37 100644 --- a/packages/development/development.kconfig +++ b/packages/development/development.kconfig @@ -50,5 +50,8 @@ source packages/development/libsigsegv/libsigsegv.kconfig # libunwind source packages/development/libunwind/libunwind.kconfig +# openblas +source packages/development/openblas/openblas.kconfig + # popt source packages/development/popt/popt.kconfig diff --git a/packages/development/development.mk b/packages/development/development.mk index 5080938..0279b82 100644 --- a/packages/development/development.mk +++ b/packages/development/development.mk @@ -53,5 +53,8 @@ $(call embtk_include_pkg,libsigsegv) # libunwind $(call embtk_include_pkg,libunwind) +# openblas +$(call embtk_include_pkg,openblas) + # popt $(call embtk_include_pkg,popt) diff --git a/packages/development/openblas/openblas.kconfig b/packages/development/openblas/openblas.kconfig new file mode 100644 index 0000000..4eb086d --- /dev/null +++ b/packages/development/openblas/openblas.kconfig @@ -0,0 +1,57 @@ +################################################################################ +# 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 openblas.kconfig +# \brief openblas.kconfig of Embtoolkit. +# \author Ricardo Crudo <ricardo.crudo@gmail.com> +# \date May 2014 +################################################################################ + +config EMBTK_HAVE_OPENBLAS + bool "Have openblas" + select EMBTK_GCC_LANGUAGE_FORTRAN + depends on (EMBTK_ARCH_ARM_FAMILY_ARM11 || EMBTK_ARCH_ARM_FAMILY_CORTEX) + depends on EMBTK_HARDFLOAT + help + OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD + version. + Please read the documents on OpenBLAS wiki pages + http://github.com/xianyi/OpenBLAS/wiki. + +choice + prompt "OpenBLAS version to use" + depends on EMBTK_HAVE_OPENBLAS + help + Which OpenBLAS version to use. + + config EMBTK_OPENBLAS_VERSION_GIT + bool "Use a branch of OpenBLAS git repository" + help + see https://github.com/xianyi/OpenBLAS +endchoice + +config EMBTK_OPENBLAS_VERSION_STRING + string + default "git" +config EMBTK_OPENBLAS_REFSPEC + string + default "development" + +config EMBTK_OPENBLAS_NEED_PATCH + bool diff --git a/packages/development/openblas/openblas.mk b/packages/development/openblas/openblas.mk new file mode 100644 index 0000000..958124c --- /dev/null +++ b/packages/development/openblas/openblas.mk @@ -0,0 +1,66 @@ +################################################################################ +# 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 openblas.mk +# \brief openblas.mk of Embtoolkit. +# \author Ricardo Crudo <ricardo.crudo@gmail.com> +# \date May 2014 +################################################################################ + +OPENBLAS_NAME := openblas +OPENBLAS_GIT_SITE := git://github.com/xianyi/OpenBLAS +OPENBLAS_SRC_DIR := $(call __embtk_pkg_srcdir,openblas) +OPENBLAS_BUILD_DIR := $(OPENBLAS_SRC_DIR) + +OPENBLAS_LIBS := libopenblas* +OPENBLAS_INCLUDE := cblas.h f77blas.h lapacke_config.h lapacke.h +OPENBLAS_INCLUDE += lapacke_mangling.h lapacke_utils.h openblas_config.h + +OPENBLAS_MAKE_OPTS := PREFIX=/usr AR=$(TARGETAR) RANLIB=$(TARGETRANLIB) +OPENBLAS_MAKE_OPTS += LD=$(TARGETLD) NM=$(TARGETNM) +OPENBLAS_MAKE_ENV := CC=$(TARGETGCC_CACHED) FC=$(TARGETFC) +OPENBLAS_MAKE_ENV += HOSTCC=$(HOSTCC_CACHED) + +pembtk_openblas_target := GENERIC + +ifeq (yy,$(CONFIG_EMBTK_ARCH_ARM_FAMILY_ARM11)$(CONFIG_EMBTK_HARDFLOAT)) +pembtk_openblas_target := ARMV6 +pembtk_openblas_armfpu := $(GCC_WITH_FPU-y) +endif +ifeq (yy,$(CONFIG_EMBTK_ARCH_ARM_FAMILY_CORTEX)$(CONFIG_EMBTK_HARDFLOAT)) +pembtk_openblas_target := ARMV7 +pembtk_openblas_armfpu := $(GCC_WITH_FPU-y) +endif +OPENBLAS_MAKE_ENV += $(if $(CONFIG_EMBTK_64BITS_FS),BINARY=64) +OPENBLAS_MAKE_ENV += TARGET=$(pembtk_openblas_target) + + +define embtk_beforeinstall_openblas + $(if $(pembtk_openblas_armfpu), + cp $(OPENBLAS_SRC_DIR)/Makefile.arm $(OPENBLAS_SRC_DIR)/Makefile.arm.bak + sed -e 's/-mfpu=[[:alnum:]]*/-mfpu=$(pembtk_openblas_armfpu)/g' \ + < $(OPENBLAS_SRC_DIR)/Makefile.arm \ + > $(OPENBLAS_SRC_DIR)/Makefile.arm.new + cp $(OPENBLAS_SRC_DIR)/Makefile.arm.new $(OPENBLAS_SRC_DIR)/Makefile.arm) +endef + +define embtk_install_openblas + $(embtk_beforeinstall_openblas) + $(call embtk_makeinstall_pkg,openblas) +endef |