f5839b74bbf93248defaca0d60b27ff24366ee38
[openwrt.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)/host-build.mk
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libgmp
29   SECTION:=libs
30   CATEGORY:=Libraries
31   TITLE:=GNU multiprecision arithmetic library
32   URL:=http://gmplib.org/
33 endef
34
35 define Package/libgmp/description
36         GMP is a free library for arbitrary precision arithmetic, operating on
37         signed integers, rational numbers, and floating point numbers.
38 endef
39
40 TARGET_CFLAGS += $(FPIC)
41 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
42 CONFIGURE_ARGS += \
43         --enable-shared \
44         --enable-static \
45         --without-readline \
46         --disable-fft \
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))
69 $(eval $(call HostBuild))