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