2006-09-07 14:42:27 +02:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=gmp
|
2007-05-14 21:19:00 +02:00
|
|
|
PKG_VERSION:=4.2.1
|
2006-09-07 14:42:27 +02:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:=@GNU/gmp
|
2007-05-14 21:19:00 +02:00
|
|
|
PKG_MD5SUM:=091c56e0e1cca6b09b17b69d47ef18e3
|
2006-09-07 14:42:27 +02:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/libgmp
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=GNU multiprecision arithmetic library
|
|
|
|
URL:=http://www.swox.com/gmp/
|
|
|
|
endef
|
|
|
|
|
2007-02-26 00:34:57 +01:00
|
|
|
CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
2006-09-07 14:42:27 +02:00
|
|
|
|
|
|
|
define Build/Compile
|
2006-09-23 15:27:50 +02:00
|
|
|
$(call Build/Compile/Default, \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
2006-10-05 13:08:18 +02:00
|
|
|
CC="$(TARGET_CC)" \
|
2006-09-23 15:27:50 +02:00
|
|
|
all install \
|
|
|
|
)
|
2006-09-07 14:42:27 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2007-09-28 03:45:11 +02:00
|
|
|
mkdir -p $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
|
|
|
|
mkdir -p $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
|
2006-09-07 14:42:27 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/UninstallDev
|
2007-09-28 03:45:11 +02:00
|
|
|
rm -rf $(1)/usr/include/gmp* \
|
|
|
|
$(1)/usr/lib/libgmp.{a,so*}
|
2006-09-07 14:42:27 +02:00
|
|
|
endef
|
|
|
|
|
2006-09-23 15:27:50 +02:00
|
|
|
define Package/libgmp/install
|
2006-11-23 01:29:07 +01:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-09-23 15:27:50 +02:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
2006-09-07 14:42:27 +02:00
|
|
|
$(eval $(call BuildPackage,libgmp))
|