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
25 include $(INCLUDE_DIR
)/host-build.mk
30 TITLE
:=Foreign Function Interface
(FFI
) library
31 URL
:=http
://sourceware.org
/libffi
/
34 define Package
/libffi
/description
35 The libffi library provides a portable
, high level programming interface to
36 various calling conventions. This allows a programmer to call any function
37 specified by a call interface description at run-time.
39 FFI stands for Foreign Function Interface. A foreign function interface is the
40 popular name for the interface that allows code written in one language to call
41 code written in another language. The libffi library really only provides the
42 lowest
, machine dependent layer of a fully featured foreign function interface.
43 A layer must exist above libffi that handles type conversions for values passed
44 between the two languages.
47 CONFIGURE_PATH
= build
48 CONFIGURE_CMD
= ..
/configure
51 define Build
/Configure
52 mkdir
-p
$(PKG_BUILD_DIR
)/build
53 $(Build
/Configure
/Default
)
56 define Build
/InstallDev
57 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
59 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.
{so
*,a
,la
} \
62 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
63 $(1)/usr
/lib
/pkgconfig
/
65 $(INSTALL_DIR
) $(1)/usr
/include
67 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi-
$(PKG_VERSION
)/include/*.h \
71 define Package
/libffi
/install
72 $(INSTALL_DIR
) $(1)/usr
/lib
74 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.so.
* \
78 $(eval
$(call HostBuild
))
79 $(eval
$(call BuildPackage
,libffi
))