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