1
0

Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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:=1
  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. endef
  27. define Package/libgmp/description
  28. GMP is a free library for arbitrary precision arithmetic, operating on
  29. signed integers, rational numbers, and floating point numbers.
  30. endef
  31. TARGET_CFLAGS += $(FPIC)
  32. CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
  33. CONFIGURE_ARGS += \
  34. --enable-shared \
  35. --enable-static \
  36. --without-readline \
  37. --disable-fft \
  38. define Build/Compile
  39. $(call Build/Compile/Default, \
  40. DESTDIR="$(PKG_INSTALL_DIR)" \
  41. CC="$(TARGET_CC)" \
  42. all \
  43. )
  44. endef
  45. define Build/InstallDev
  46. $(INSTALL_DIR) $(1)/usr/include
  47. $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
  50. endef
  51. define Package/libgmp/install
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
  54. endef
  55. $(eval $(call BuildPackage,libgmp))
  56. $(eval $(call HostBuild))