Fix compilation when modules are selected or not, should fix buildbot spam :p
[openwrt/svn-archive/archive.git] / libs / bluez-libs / 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:=bluez-libs
12 PKG_VERSION:=2.24
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://bluez.sourceforge.net/download
17 PKG_MD5SUM:=d0ba50e251ae1e7f2c09024facde8e40
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/bluez-libs
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Bluetooth library
29 URL:=http://www.bluez.org/
30 endef
31
32 define Build/Configure
33 $(call Build/Configure/Default, \
34 --enable-shared \
35 --enable-static \
36 )
37 endef
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 DESTDIR="$(PKG_INSTALL_DIR)" \
42 all install
43 endef
44
45 define Build/InstallDev
46 mkdir -p $(STAGING_DIR)/usr/include/bluetooth
47 $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth/*.h $(STAGING_DIR)/usr/include/bluetooth
48 mkdir -p $(STAGING_DIR)/usr/lib
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(STAGING_DIR)/usr/lib/
50 endef
51
52 define Build/UninstallDev
53 rm -rf \
54 $(STAGING_DIR)/usr/include/bluetooth \
55 $(STAGING_DIR)/usr/lib/libbluetooth.{a,so*}
56 endef
57
58 define Package/bluez-libs/install
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,bluez-libs))