Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Copyright (C) 2006-2008 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=gmp
  10. PKG_VERSION:=4.2.2
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=@GNU/gmp
  14. PKG_MD5SUM:=7ce52531644e6d12f16911b7e3151f3f
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/libgmp
  17. SECTION:=libs
  18. CATEGORY:=Libraries
  19. TITLE:=GNU multiprecision arithmetic library
  20. URL:=http://gmplib.org/
  21. endef
  22. define Package/libgmp/description
  23. GMP is a free library for arbitrary precision arithmetic, operating on
  24. signed integers, rational numbers, and floating point numbers.
  25. endef
  26. CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
  27. CONFIGURE_ARGS += \
  28. --enable-shared \
  29. --enable-static \
  30. define Build/Compile
  31. $(call Build/Compile/Default, \
  32. DESTDIR="$(PKG_INSTALL_DIR)" \
  33. CC="$(TARGET_CC)" \
  34. all install \
  35. )
  36. endef
  37. define Build/InstallDev
  38. mkdir -p $(1)/usr/include
  39. $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
  40. mkdir -p $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
  42. endef
  43. define Package/libgmp/install
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
  46. endef
  47. $(eval $(call BuildPackage,libgmp))