comparison src/gmp.mk @ 3076:b39e8dc859f7

[MSVC] enable gmplib compilation - create clgfortran.exe wrapper (to make libtool happy) - make cc-msvc/clgcc/clg++ to ignore --export-all-symbols and --output-def
author Michael Goffioul <michael.goffioul@gmail.com>
date Fri, 21 Jun 2013 19:50:36 -0400
parents 5ef49fb3299d
children cf6f40cededb
comparison
equal deleted inserted replaced
3075:21586f2d1fe7 3076:b39e8dc859f7
8 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 8 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
9 $(PKG)_URL := ftp://ftp.gmplib.org/pub/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE) 9 $(PKG)_URL := ftp://ftp.gmplib.org/pub/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
10 $(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/$(PKG)/$($(PKG)_FILE) 10 $(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/$(PKG)/$($(PKG)_FILE)
11 $(PKG)_DEPS := 11 $(PKG)_DEPS :=
12 12
13 ifeq ($(MXE_SYSTEM),msvc)
14 $(PKG)_CONFIGURE_OPTIONS := CC_FOR_BUILD='$(MXE_CC)' CCAS='gcc -c' ac_cv_func_memset='yes'
15 COMMA := ,
16 else
17 $(PKG)_CONFIGURE_OPTIONS := CC_FOR_BUILD=gcc
18 endif
19
13 define $(PKG)_UPDATE 20 define $(PKG)_UPDATE
14 $(WGET) -q -O- 'http://www.gmplib.org/' | \ 21 $(WGET) -q -O- 'http://www.gmplib.org/' | \
15 grep '<a href="' | \ 22 grep '<a href="' | \
16 $(SED) -n 's,.*gmp-\([0-9][^>]*\)\.tar.*,\1,p' | \ 23 $(SED) -n 's,.*gmp-\([0-9][^>]*\)\.tar.*,\1,p' | \
17 grep -v '^4\.' | \ 24 grep -v '^4\.' | \
18 head -1 25 head -1
19 endef 26 endef
20 27
21 define $(PKG)_BUILD 28 define $(PKG)_BUILD
22 cd '$(1)' && CC_FOR_BUILD=gcc ./configure \ 29 $(if $(filter msvc,$(MXE_SYSTEM)), \
30 $(SED) -i -e '/^#ifdef _MSC_VER/$(COMMA)/^#endif/ {/^ *#define __GMP_EXTERN_INLINE .*/d}' '$(1)/gmp-h.in')
31 cd '$(1)' && ./configure \
23 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ 32 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
33 $($(PKG)_CONFIGURE_OPTIONS) \
24 --prefix='$(HOST_PREFIX)' \ 34 --prefix='$(HOST_PREFIX)' \
25 $(ENABLE_SHARED_OR_STATIC) \ 35 $(ENABLE_SHARED_OR_STATIC) \
26 --enable-cxx \ 36 --enable-cxx \
27 --without-readline 37 --without-readline && $(CONFIGURE_POST_HOOK)
28 $(MAKE) -C '$(1)' -j '$(JOBS)' 38 $(MAKE) -C '$(1)' -j '$(JOBS)'
29 $(MAKE) -C '$(1)' -j 1 install 39 $(MAKE) -C '$(1)' -j 1 install
30 endef 40 endef