Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.2.1
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=@GNU/gmp
  14. PKG_MD5SUM:=091c56e0e1cca6b09b17b69d47ef18e3
  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 $(1)/usr/include
  35. $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
  36. mkdir -p $(1)/usr/lib
  37. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
  38. endef
  39. define Package/libgmp/install
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
  42. endef
  43. $(eval $(call BuildPackage,libgmp))