Add a few SPDX tags
[openwrt/staging/wigyori.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 PKG_LICENSE:=GPL-2.0+
23
24 PKG_USE_MIPS16:=0
25
26 include $(INCLUDE_DIR)/host-build.mk
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libgmp
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=GNU multiprecision arithmetic library
33 URL:=http://gmplib.org/
34 endef
35
36 define Package/libgmp/description
37 GMP is a free library for arbitrary precision arithmetic, operating on
38 signed integers, rational numbers, and floating point numbers.
39 endef
40
41 TARGET_CFLAGS += $(FPIC)
42 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
43 CONFIGURE_ARGS += \
44 --enable-shared \
45 --enable-static \
46 --without-readline \
47 --disable-fft \
48
49 define Build/Compile
50 $(call Build/Compile/Default, \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 CC="$(TARGET_CC)" \
53 all \
54 )
55 endef
56
57 define Build/InstallDev
58 $(INSTALL_DIR) $(1)/usr/include
59 $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
62 endef
63
64 define Package/libgmp/install
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
67 endef
68
69 $(eval $(call BuildPackage,libgmp))
70 $(eval $(call HostBuild))