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