You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/gmp.mk

40 lines
1.5 KiB

# This file is part of MXE.
# See index.html for further information.
PKG := gmp
$(PKG)_IGNORE :=
$(PKG)_VERSION := 6.0.0
$(PKG)_CHECKSUM := 360802e3541a3da08ab4b55268c80f799939fddc
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION)a.tar.bz2
$(PKG)_URL := ftp://ftp.gmplib.org/pub/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://www.gmplib.org/' | \
grep '<a href="' | \
$(SED) -n 's,.*gmp-\([0-9][^>]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1
endef
define $(PKG)_BUILD
cd '$(1)' && CC_FOR_BUILD=gcc ./configure \
$(MXE_CONFIGURE_OPTS) \
--enable-cxx \
--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'
endef