[packages] libjpeg-turbo: Fix copyright notice
[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.11
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:=f69b9693227d976835b4857b1ba7d0e3
17
18 PKG_LICENSE:=MIT
19 PKG_LICENSE_FILES:=LICENSE
20
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/host-build.mk
26
27 define Package/libffi
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE:=Foreign Function Interface (FFI) library
31 URL:=http://sourceware.org/libffi/
32 endef
33
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.
38
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.
45 endef
46
47 CONFIGURE_PATH = build
48 CONFIGURE_CMD = ../configure
49 MAKE_PATH = build
50
51 define Build/Configure
52 mkdir -p $(PKG_BUILD_DIR)/build
53 $(Build/Configure/Default)
54 endef
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
58 $(CP) \
59 $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \
60 $(1)/usr/lib/
61 $(CP) \
62 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
63 $(1)/usr/lib/pkgconfig/
64
65 $(INSTALL_DIR) $(1)/usr/include
66 $(CP) \
67 $(PKG_INSTALL_DIR)/usr/lib/libffi-$(PKG_VERSION)/include/*.h \
68 $(1)/usr/include/
69 endef
70
71 define Package/libffi/install
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(CP) \
74 $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* \
75 $(1)/usr/lib/
76 endef
77
78 $(eval $(call HostBuild))
79 $(eval $(call BuildPackage,libffi))