Fix compilation when modules are selected or not, should fix buildbot spam :p
[openwrt/svn-archive/archive.git] / libs / libffi-sable / Makefile
1 #
2 # Copyright (C) 2006 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-sable
12 PKG_VERSION:=3325
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://sablevm.org/download/snapshot/2005-01-21/
17 PKG_MD5SUM:=0c32eaaea0269c5fbe156fcd0be3e5bd
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libffi-sable
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Foreign Function Interface library (for sablevm)
29 DESCRIPTION:=\
30 The libffi library provides a portable, high level programming \\\
31 interface to various calling conventions. This allows a programmer to \\\
32 call any function specified by a call interface description at run \\\
33 time.
34 URL:=http://sources.redhat.com/libffi/
35 endef
36
37 define Build/Configure
38 $(call Build/Configure/Default, \
39 --enable-shared \
40 --enable-static \
41 --disable-debug \
42 )
43 endef
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
48 all install
49 endef
50
51 define Build/InstallDev
52 mkdir -p $(STAGING_DIR)/usr/include
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/ffi{,target}.h $(STAGING_DIR)/usr/include/
54 mkdir -p $(STAGING_DIR)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.{a,so*} $(STAGING_DIR)/usr/lib/
56 endef
57
58 define Build/UninstallDev
59 rm -rf \
60 $(STAGING_DIR)/usr/include/ffi{,target}.h \
61 $(STAGING_DIR)/usr/lib/libffi.{a,so*}
62 endef
63
64 define Package/libffi-sable/install
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* $(1)/usr/lib/
67 endef
68
69 $(eval $(call BuildPackage,libffi-sable))