rules.mak 691 Bytes
Newer Older
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
1 2
# GNU Multiple Precision Arithmetic

3
GMP_VERSION := 6.1.2
4
GMP_URL := https://gmplib.org/download/gmp-$(GMP_VERSION)/gmp-$(GMP_VERSION).tar.bz2
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
5

6 7 8 9 10 11
GMP_CONF :=

ifeq ($(CC),clang)
ifeq ($(ARCH),mipsel)
GMP_CONF += --disable-assembly
endif
12 13 14
ifeq ($(ARCH),mips64el)
GMP_CONF += --disable-assembly
endif
15 16
endif

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
17
$(TARBALLS)/gmp-$(GMP_VERSION).tar.bz2:
18
	$(call download_pkg,$(GMP_URL),gmp)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
19 20 21 22 23

.sum-gmp: gmp-$(GMP_VERSION).tar.bz2

gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp
	$(UNPACK)
24
	$(APPLY) $(SRC)/gmp/ppc64.patch
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
25 26
	$(MOVE)

27
# GMP requires either GPLv2 or LGPLv3
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
28
.gmp: gmp
29 30 31
ifndef GPL
	$(REQUIRE_GNUV3)
endif
32
	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(GMP_CONF)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
33 34
	cd $< && $(MAKE) install
	touch $@