b5737505b7a9fa759fe80281e342c129fda6db83
[openwrt/openwrt.git] / package / libs / gmp / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gmp
11 PKG_VERSION:=6.1.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz
15 PKG_SOURCE_URL:=@GNU/gmp/
16 PKG_HASH:=87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912
17
18 PKG_BUILD_PARALLEL:=1
19 PKG_INSTALL:=1
20 PKG_FIXUP:=autoreconf
21 PKG_LICENSE:=GPL-2.0+
22
23 PKG_USE_MIPS16:=0
24
25 include $(INCLUDE_DIR)/host-build.mk
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libgmp
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=GNU multiprecision arithmetic library
32 URL:=http://gmplib.org/
33 endef
34
35 define Package/libgmp/description
36 GMP is a free library for arbitrary precision arithmetic, operating on
37 signed integers, rational numbers, and floating point numbers.
38 endef
39
40 TARGET_CFLAGS += $(FPIC)
41 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
42 CONFIGURE_ARGS += \
43 --enable-shared \
44 --enable-static \
45 --without-readline \
46 --disable-fft \
47
48 define Build/Compile
49 $(call Build/Compile/Default, \
50 DESTDIR="$(PKG_INSTALL_DIR)" \
51 CC="$(TARGET_CC)" \
52 all \
53 )
54 endef
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
61 endef
62
63 define Package/libgmp/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,libgmp))
69 $(eval $(call HostBuild))