make libmad depending on CONFIG_BUILD_PATENTED
[openwrt/svn-archive/archive.git] / libs / phidget21 / Makefile
1 #
2 # Copyright (C) 2009 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:=phidget21
11 PKG_VERSION:=2.1.6.20091105
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=Phidgetlinux_$(PKG_VERSION).tar.gz
15 PKG_BUILD_DIR:=$(BUILD_DIR)/Phidgetlinux
16 PKG_SOURCE_URL:=http://www.phidgets.com/downloads/libraries/
17 PKG_MD5SUM:=eb48c7fc68ab189a0255c35e71d55ecd
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/phidget21
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=Phidget API
25 URL:=http://www.phidgets.com/
26 endef
27
28 define Package/phidget21/description
29 The Phidget API library.
30 endef
31
32 define Package/phidget-service
33 SECTION:=misc
34 CATEGORY:=Network
35 TITLE:=Phidget Web Service
36 URL:=http://www.phidgets.com/
37 DEPENDS:=phidget21
38 endef
39
40 define Package/phidget-service/description
41 The Phidget Web Service.
42 endef
43
44 define Build/Configure
45 $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/include/
46 $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/lib/
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR)/phidget21 \
51 $(TARGET_CONFIGURE_OPTS) \
52 CFLAGS="$(TARGET_CFLAGS) -Wall -Wno-strict-aliasing -fpic -D_LINUX -I. -Iutils" \
53 INSTALLPREFIX="$(PKG_INSTALL_DIR)" LDCONFIG="" \
54 all install
55 $(MAKE) -C $(PKG_BUILD_DIR)/webservice \
56 $(TARGET_CONFIGURE_OPTS) LDCONFIG="true" \
57 CFLAGS="$(TARGET_CFLAGS) -Wall -Wno-strict-aliasing -fpic -D_LINUX -I. -Iutils" \
58 phidget21internal.h
59 $(MAKE) -C $(PKG_BUILD_DIR)/webservice \
60 $(TARGET_CONFIGURE_OPTS) LDCONFIG="true" \
61 LIBS="-lphidget21 -L../phidget21" \
62 CFLAGS="$(TARGET_CFLAGS) -static -D_LINUX -I. -I../phidget21 -I../phidget21/utils" \
63 webservice21
64 endef
65
66 define Build/InstallDev
67 ls $(PKG_INSTALL_DIR)
68 $(INSTALL_DIR) $(1)/usr/include
69 $(CP) $(PKG_INSTALL_DIR)/usr/include/phidget21.h $(1)/usr/include/
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libphidget21.so $(1)/usr/lib/
72 endef
73
74 define Package/phidget21/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libphidget21.so $(1)/usr/lib/
77 endef
78
79 define Package/phidget-service/install
80 $(INSTALL_DIR) $(1)/usr/bin
81 $(INSTALL_BIN) $(PKG_BUILD_DIR)/webservice/phidgetwebservice21 $(1)/usr/bin/
82 endef
83
84 $(eval $(call BuildPackage,phidget21))
85 $(eval $(call BuildPackage,phidget-service))