[packages] massive: use $(INSTALL_DIR) instead of 'mkdir -p' in install and InstallDev
[openwrt/svn-archive/archive.git] / libs / gmp / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@GNU/gmp
16 PKG_MD5SUM:=26cec15a90885042dd4a15c4003b08ae
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libgmp
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=GNU multiprecision arithmetic library
24 URL:=http://gmplib.org/
25 endef
26
27 define Package/libgmp/description
28 GMP is a free library for arbitrary precision arithmetic, operating on
29 signed integers, rational numbers, and floating point numbers.
30 endef
31
32 TARGET_CFLAGS += $(FPIC)
33 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
34 CONFIGURE_ARGS += \
35 --enable-shared \
36 --enable-static \
37
38 define Build/Compile
39 $(call Build/Compile/Default, \
40 DESTDIR="$(PKG_INSTALL_DIR)" \
41 CC="$(TARGET_CC)" \
42 all install \
43 )
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
51 endef
52
53 define Package/libgmp/install
54 $(INSTALL_DIR) $(1)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
56 endef
57
58 $(eval $(call BuildPackage,libgmp))