mxe/src/armadillo.mk

43 lines
1.5 KiB
Makefile
Raw Permalink Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2012-09-09 16:01:46 +01:00
PKG := armadillo
2017-03-05 03:41:39 +00:00
$(PKG)_WEBSITE := https://arma.sourceforge.io/
$(PKG)_DESCR := Armadillo C++ linear algebra library
2012-09-09 16:01:46 +01:00
$(PKG)_IGNORE :=
$(PKG)_VERSION := 8.200.2
$(PKG)_CHECKSUM := 63845e36235f2bd78b4f6890fe5013b6ce51a4e92e3176b20bbc6631b340050a
2012-09-09 16:01:46 +01:00
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
2017-03-14 23:43:22 +00:00
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/arma/$($(PKG)_FILE)
$(PKG)_DEPS := cc hdf5 openblas
2012-09-09 16:01:46 +01:00
define $(PKG)_UPDATE
2017-03-04 10:33:47 +00:00
$(WGET) -q -O- 'https://sourceforge.net/projects/arma/files/' | \
2012-09-20 19:17:44 +01:00
$(SED) -n 's,.*/armadillo-\([0-9.]*\)[.]tar.*".*,\1,p' | \
2012-09-09 16:01:46 +01:00
head -1
endef
2013-04-25 05:56:51 +01:00
define $(PKG)_BUILD
# build and install the library
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
-DDETECT_HDF5=ON \
-DARMA_USE_WRAPPER=ON
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install VERBOSE=1
2012-09-09 16:01:46 +01:00
# create pkg-config file
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
(echo 'Name: $(PKG)'; \
echo 'Version: $($(PKG)_VERSION)'; \
echo 'Description: $($(PKG)_DESCR)'; \
echo 'Requires: hdf5 openblas'; \
echo 'Libs: -larmadillo'; \
) > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc'
# compile test
2012-09-18 22:12:32 +01:00
'$(TARGET)-g++' \
-W -Wall -Werror \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`'$(TARGET)-pkg-config' $(PKG) --cflags --libs`
2012-09-09 16:01:46 +01:00
endef