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