Makefile (2230B)
1 # 2 # Copyright (C) 2009-2016 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.2.1 12 PKG_RELEASE:=2 13 14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 15 PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/ 16 PKG_MD5SUM:=83b89587607e3eb65c70d361f13bab43 17 18 PKG_LICENSE:=MIT 19 PKG_LICENSE_FILES:=LICENSE 20 21 PKG_FIXUP:=autoreconf 22 PKG_INSTALL:=1 23 PKG_USE_MIPS16:=0 24 25 include $(INCLUDE_DIR)/package.mk 26 include $(INCLUDE_DIR)/host-build.mk 27 28 define Package/libffi 29 SECTION:=libs 30 CATEGORY:=Libraries 31 TITLE:=Foreign Function Interface (FFI) library 32 URL:=http://sourceware.org/libffi/ 33 MAINTAINER:=Peter Wagner <tripolar@gmx.at> 34 endef 35 36 define Package/libffi/description 37 The libffi library provides a portable, high level programming interface to 38 various calling conventions. This allows a programmer to call any function 39 specified by a call interface description at run-time. 40 41 FFI stands for Foreign Function Interface. A foreign function interface is the 42 popular name for the interface that allows code written in one language to call 43 code written in another language. The libffi library really only provides the 44 lowest, machine dependent layer of a fully featured foreign function interface. 45 A layer must exist above libffi that handles type conversions for values passed 46 between the two languages. 47 endef 48 49 CONFIGURE_PATH = build 50 CONFIGURE_CMD = ../configure 51 MAKE_PATH = build 52 53 define Build/Configure 54 mkdir -p $(PKG_BUILD_DIR)/build 55 $(Build/Configure/Default) 56 endef 57 58 define Build/InstallDev 59 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 60 $(CP) \ 61 $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \ 62 $(1)/usr/lib/ 63 $(CP) \ 64 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ 65 $(1)/usr/lib/pkgconfig/ 66 sed -i -e 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr/lib/pkgconfig/libffi.pc 67 68 $(INSTALL_DIR) $(1)/usr/include 69 $(CP) \ 70 $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)-$(PKG_VERSION)/include/*.h \ 71 $(1)/usr/include/ 72 endef 73 74 define Package/libffi/install 75 $(INSTALL_DIR) $(1)/usr/lib 76 $(CP) \ 77 $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* \ 78 $(1)/usr/lib/ 79 endef 80 81 $(eval $(call HostBuild)) 82 $(eval $(call BuildPackage,libffi))