2 # Copyright (C) 2006-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz
15 PKG_SOURCE_URL:=@GNU/gmp/
16 PKG_MD5SUM:=a9868ef2556ad6a2909babcd1428f3c7
25 include $(INCLUDE_DIR)/host-build.mk
26 include $(INCLUDE_DIR)/package.mk
31 TITLE:=GNU multiprecision arithmetic library
32 URL:=http://gmplib.org/
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.
40 TARGET_CFLAGS += $(FPIC)
41 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
49 $(call Build/Compile/Default, \
50 DESTDIR="$(PKG_INSTALL_DIR)" \
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/
63 define Package/libgmp/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
68 $(eval $(call BuildPackage,libgmp))
69 $(eval $(call HostBuild))