Add libffi.
[openwrt/svn-archive/archive.git] / libs / libffi / Makefile
1 #
2 # Copyright (C) 2009 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:=libffi
12 PKG_VERSION:=3.0.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/
17 PKG_MD5SUM:=188a4f79fdac2310044b44b7d3918ef9
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libffi
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=libffi
26 URL:=http://sourceware.org/libffi/
27 endef
28
29 define Package/libffi/description
30 The libffi library provides a portable, high level programming interface to
31 various calling conventions. This allows a programmer to call any function
32 specified by a call interface description at run-time.
33
34 FFI stands for Foreign Function Interface. A foreign function interface is the
35 popular name for the interface that allows code written in one language to call
36 code written in another language. The libffi library really only provides the
37 lowest, machine dependent layer of a fully featured foreign function interface.
38 A layer must exist above libffi that handles type conversions for values passed
39 between the two languages.
40 endef
41
42 define Build/InstallDev
43 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
44 $(CP) \
45 $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \
46 $(1)/usr/lib/
47 $(INSTALL_DATA) \
48 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
49 $(1)/usr/lib/pkgconfig/
50
51 $(INSTALL_DIR) $(1)/usr/include
52 $(INSTALL_DATA) \
53 $(PKG_INSTALL_DIR)/usr/lib/libffi-3.0.8/include/*.h \
54 $(1)/usr/include/
55 endef
56
57 define Package/libffi/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) \
60 $(PKG_INSTALL_DIR)/usr/lib/libffi.so* \
61 $(1)/usr/lib/
62 endef
63
64 $(eval $(call BuildPackage,libffi))