Makefile 1.6 KB

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