2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_SOURCE_URL
:=@GNU
/gmp
18 PKG_MD5SUM
:=0aa7d3b3f5b5ec5951e7dddd6f65e891
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
28 TITLE
:=GNU multiprecision arithmetic library
29 DESCRIPTION
:=GNU multiprecision arithmetic library.
30 URL
:=http
://www.swox.com
/gmp
/
33 define Build
/Configure
34 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
35 $(TARGET_CONFIGURE_OPTS
) \
36 CC
="$(TARGET_CROSS)gcc" \
37 CFLAGS
="$(TARGET_CFLAGS)" \
38 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
39 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
41 --target
=$(GNU_TARGET_NAME
) \
42 --host
=$(GNU_TARGET_NAME
) \
43 --build
=$(GNU_HOST_NAME
) \
49 --datadir=/usr
/share \
50 --includedir=/usr
/include \
51 --infodir=/usr
/share
/info \
53 --libexecdir
=/usr
/lib \
54 --localstatedir
=/var \
55 --mandir=/usr
/share
/man \
59 $(DISABLE_LARGEFILE
) \
66 $(call Build
/Compile
/Default
, DESTDIR
="$(PKG_INSTALL_DIR)" all install)
69 define Package
/libgmp
/install
70 install -m0755
-d
$(1)/usr
/lib
71 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgmp.so.
* $(1)/usr
/lib
/
74 define Build
/InstallDev
75 mkdir
-p
$(STAGING_DIR
)/usr
/include
76 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gmp
* $(STAGING_DIR
)/usr
/include/
77 mkdir
-p
$(STAGING_DIR
)/usr
/lib
78 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgmp.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
81 define Build
/UninstallDev
83 $(STAGING_DIR
)/usr
/include/gmp
* \
84 $(STAGING_DIR
)/usr
/lib
/libgmp.
{a
,so
*}
87 $(eval
$(call BuildPackage
,libgmp
))