mxe/src/gmp.mk

51 lines
1.8 KiB
Makefile
Raw Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2010-04-10 07:16:56 +01:00
PKG := gmp
2017-03-05 03:41:39 +00:00
$(PKG)_WEBSITE := https://gmplib.org/
$(PKG)_DESCR := GMP
2010-04-10 07:16:56 +01:00
$(PKG)_IGNORE :=
2016-12-17 23:20:15 +00:00
$(PKG)_VERSION := 6.1.2
$(PKG)_CHECKSUM := 87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912
2010-04-10 07:16:56 +01:00
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
2015-11-05 15:56:09 +00:00
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://gmplib.org/download/$(PKG)/$($(PKG)_FILE)
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
$(PKG)_DEPS := cc
2010-04-10 07:16:56 +01:00
$(PKG)_DEPS_$(BUILD) :=
2010-04-10 07:16:56 +01:00
define $(PKG)_UPDATE
2017-03-05 03:41:39 +00:00
$(WGET) -q -O- 'https://gmplib.org/' | \
2010-04-10 07:16:56 +01:00
grep '<a href="' | \
$(SED) -n 's,.*gmp-\([0-9][^>]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1
2010-04-10 07:16:56 +01:00
endef
define $(PKG)_BUILD
cd '$(1)' && CC_FOR_BUILD=$(BUILD_CC) ./configure \
$(MXE_CONFIGURE_OPTS) \
2011-05-27 21:57:29 +01:00
--enable-cxx \
2010-04-10 07:16:56 +01:00
--without-readline
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
# build runtime tests to verify toolchain components
-$(MAKE) -C '$(1)' -j '$(JOBS)' check -k
rm -rf '$(PREFIX)/$(TARGET)/bin/$(PKG)-tests'
cp -R '$(1)/tests' '$(PREFIX)/$(TARGET)/bin/$(PKG)-tests'
(printf 'date /t > all-tests-$(PKG)-$($(PKG)_VERSION).txt\r\n'; \
printf 'time /t >> all-tests-$(PKG)-$($(PKG)_VERSION).txt\r\n'; \
printf 'set PATH=..\\;%%PATH%%\r\n'; \
printf 'for /R %%%%f in (*.exe) do %%%%f || echo %%%%f fail >> all-tests-$(PKG)-$($(PKG)_VERSION).txt\r\n';) \
> '$(PREFIX)/$(TARGET)/bin/$(PKG)-tests/all-tests-$(PKG)-$($(PKG)_VERSION).bat'
2010-04-10 07:16:56 +01:00
endef
define $(PKG)_BUILD_$(BUILD)
mkdir '$(1).build'
cd '$(1).build' && '$(1)/configure' \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(1).build' -j '$(JOBS)' man1_MANS=
$(MAKE) -C '$(1).build' -j 1 install man1_MANS=
endef