Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # Copyright (C) 2006-2014 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.0.0
  10. PKG_REVISION:=a
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz
  13. PKG_SOURCE_URL:=http://gmplib.org/download/gmp/
  14. PKG_MD5SUM:=1e6da4e434553d2811437aa42c7f7c76
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_INSTALL:=1
  17. PKG_FIXUP:=autoreconf
  18. PKG_LICENSE:=GPL-2.0+
  19. PKG_USE_MIPS16:=0
  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. 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))