gmp: import from packages, update and reduce size
[openwrt/svn-archive/archive.git] / package / libs / gmp / Makefile
1 #
2 # Copyright (C) 2006-2014 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:=6.0.0
12 PKG_REVISION:=a
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz
16 PKG_SOURCE_URL:=ftp://ftp.gmplib.org/pub/$(PKG_NAME)/
17 PKG_MD5SUM:=1e6da4e434553d2811437aa42c7f7c76
18
19 PKG_BUILD_PARALLEL:=1
20 PKG_INSTALL:=1
21 PKG_FIXUP:=autoreconf
22
23 PKG_USE_MIPS16:=0
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/libgmp
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE:=GNU multiprecision arithmetic library
31 URL:=http://gmplib.org/
32 endef
33
34 define Package/libgmp/description
35 GMP is a free library for arbitrary precision arithmetic, operating on
36 signed integers, rational numbers, and floating point numbers.
37 endef
38
39 TARGET_CFLAGS += $(FPIC)
40 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
41 CONFIGURE_ARGS += \
42 --enable-shared \
43 --enable-static \
44 --without-readline \
45 --disable-fft \
46
47
48 define Build/Compile
49 $(call Build/Compile/Default, \
50 DESTDIR="$(PKG_INSTALL_DIR)" \
51 CC="$(TARGET_CC)" \
52 all \
53 )
54 endef
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
61 endef
62
63 define Package/libgmp/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,libgmp))