1
0

Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gmp
  9. PKG_VERSION:=6.1.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/gmp/
  13. PKG_HASH:=87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_INSTALL:=1
  16. PKG_FIXUP:=autoreconf
  17. PKG_LICENSE:=GPL-2.0+
  18. PKG_USE_MIPS16:=0
  19. include $(INCLUDE_DIR)/host-build.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libgmp
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=GNU multiprecision arithmetic library
  25. URL:=http://gmplib.org/
  26. ABI_VERSION:=10
  27. endef
  28. define Package/libgmp/description
  29. GMP is a free library for arbitrary precision arithmetic, operating on
  30. signed integers, rational numbers, and floating point numbers.
  31. endef
  32. TARGET_CFLAGS += $(FPIC)
  33. CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
  34. CONFIGURE_ARGS += \
  35. --enable-shared \
  36. --enable-static \
  37. --without-readline \
  38. --disable-fft \
  39. define Build/Compile
  40. $(call Build/Compile/Default, \
  41. DESTDIR="$(PKG_INSTALL_DIR)" \
  42. CC="$(TARGET_CC)" \
  43. all \
  44. )
  45. endef
  46. define Build/InstallDev
  47. $(INSTALL_DIR) $(1)/usr/include
  48. $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
  51. endef
  52. define Package/libgmp/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
  55. endef
  56. $(eval $(call BuildPackage,libgmp))
  57. $(eval $(call HostBuild))