You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.4 KiB

11 years ago
  1. #
  2. # Copyright (C) 2006-2012 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:=5.1.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=ftp://ftp.gmplib.org/pub/$(PKG_NAME)-$(PKG_VERSION)/
  13. PKG_MD5SUM:=a082867cbca5e898371a97bb27b31fea
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_INSTALL:=1
  16. PKG_FIXUP:=autoreconf
  17. PKG_USE_MIPS16:=0
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/libgmp
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=GNU multiprecision arithmetic library
  23. URL:=http://gmplib.org/
  24. endef
  25. define Package/libgmp/description
  26. GMP is a free library for arbitrary precision arithmetic, operating on
  27. signed integers, rational numbers, and floating point numbers.
  28. endef
  29. TARGET_CFLAGS += $(FPIC)
  30. CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
  31. CONFIGURE_ARGS += \
  32. --enable-shared \
  33. --enable-static \
  34. define Build/Compile
  35. $(call Build/Compile/Default, \
  36. DESTDIR="$(PKG_INSTALL_DIR)" \
  37. CC="$(TARGET_CC)" \
  38. all \
  39. )
  40. endef
  41. define Build/InstallDev
  42. $(INSTALL_DIR) $(1)/usr/include
  43. $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
  46. endef
  47. define Package/libgmp/install
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
  50. endef
  51. $(eval $(call BuildPackage,libgmp))