Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Copyright (C) 2006 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.1.4
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=@GNU/gmp
  14. PKG_MD5SUM:=0aa7d3b3f5b5ec5951e7dddd6f65e891
  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://www.swox.com/gmp/
  21. endef
  22. CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
  23. CONFIGURE_ARGS += \
  24. --enable-shared \
  25. --enable-static \
  26. define Build/Compile
  27. $(call Build/Compile/Default, \
  28. DESTDIR="$(PKG_INSTALL_DIR)" \
  29. CC="$(TARGET_CC)" \
  30. all install \
  31. )
  32. endef
  33. define Build/InstallDev
  34. mkdir -p $(STAGING_DIR)/usr/include
  35. $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(STAGING_DIR)/usr/include/
  36. mkdir -p $(STAGING_DIR)/usr/lib
  37. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(STAGING_DIR)/usr/lib/
  38. endef
  39. define Build/UninstallDev
  40. rm -rf $(STAGING_DIR)/usr/include/gmp* \
  41. $(STAGING_DIR)/usr/lib/libgmp.{a,so*}
  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))