add a default for PKG_BUILD_DIR and PKG_INSTALL_DIR (will use KERNEL_BUILD_DIR if...
[openwrt.git] / package / gmp / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gmp
12 PKG_VERSION:=4.1.4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@GNU/gmp
17 PKG_MD5SUM:=0aa7d3b3f5b5ec5951e7dddd6f65e891
18 PKG_CAT:=bzcat
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://www.swox.com/gmp/
27 endef
28
29 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
30 CONFIGURE_ARGS += \
31 --enable-shared \
32 --enable-static \
33
34 define Build/Compile
35 $(call Build/Compile/Default, \
36 DESTDIR="$(PKG_INSTALL_DIR)" \
37 CC="$(TARGET_CC)" \
38 all install \
39 )
40 endef
41
42 define Build/InstallDev
43 mkdir -p $(STAGING_DIR)/usr/include
44 $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(STAGING_DIR)/usr/include/
45 mkdir -p $(STAGING_DIR)/usr/lib
46 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(STAGING_DIR)/usr/lib/
47 endef
48
49 define Build/UninstallDev
50 rm -rf $(STAGING_DIR)/usr/include/gmp* \
51 $(STAGING_DIR)/usr/lib/libgmp.{a,so*}
52 endef
53
54 define Package/libgmp/install
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,libgmp))
This page took 0.052687 seconds and 5 git commands to generate.