2 # Copyright (C) 2009-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=ftp
://sourceware.org
/pub
/libffi
/
16 PKG_MD5SUM
:=f69b9693227d976835b4857b1ba7d0e3
19 PKG_LICENSE_FILES
:=LICENSE
24 include $(INCLUDE_DIR
)/package.mk
29 TITLE
:=Foreign Function Interface
(FFI
) library
30 URL
:=http
://sourceware.org
/libffi
/
33 define Package
/libffi
/description
34 The libffi library provides a portable
, high level programming interface to
35 various calling conventions. This allows a programmer to call any function
36 specified by a call interface description at run-time.
38 FFI stands for Foreign Function Interface. A foreign function interface is the
39 popular name for the interface that allows code written in one language to call
40 code written in another language. The libffi library really only provides the
41 lowest
, machine dependent layer of a fully featured foreign function interface.
42 A layer must exist above libffi that handles type conversions for values passed
43 between the two languages.
46 CONFIGURE_PATH
= build
47 CONFIGURE_CMD
= ..
/configure
50 define Build
/Configure
51 mkdir
-p
$(PKG_BUILD_DIR
)/build
52 $(Build
/Configure
/Default
)
55 define Build
/InstallDev
56 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
58 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.
{so
*,a
,la
} \
61 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
62 $(1)/usr
/lib
/pkgconfig
/
64 $(INSTALL_DIR
) $(1)/usr
/include
66 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi-
$(PKG_VERSION
)/include/*.h \
70 define Package
/libffi
/install
71 $(INSTALL_DIR
) $(1)/usr
/lib
73 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.so.
* \
77 $(eval
$(call BuildPackage
,libffi
))