f92e4e36950f3361441c96e725290a9d1d82ef09
[openwrt/svn-archive/archive.git] / net / phidget21 / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=phidget21
11 PKG_VERSION:=2.1.4.20080924
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:=635bfbd701b3b7c32e262bcc5130380e
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/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR)/phidget21 \
46 $(TARGET_CONFIGURE_OPTS) \
47 CFLAGS="$(TARGET_CFLAGS) -static -D_LINUX -I. -Iutils" \
48 all
49 $(MAKE) -C $(PKG_BUILD_DIR)/webservice \
50 $(TARGET_CONFIGURE_OPTS) \
51 CFLAGS="$(TARGET_CFLAGS) -D_LINUX -I. -Iutils" \
52 phidget21internal.h
53 $(MAKE) -C $(PKG_BUILD_DIR)/webservice \
54 $(TARGET_CONFIGURE_OPTS) \
55 LIBS="-lphidget21 -L../phidget21" \
56 CFLAGS="$(TARGET_CFLAGS) -static -D_LINUX -I. -I../phidget21 -I../phidget21/utils" \
57 webservice21
58 endef
59
60 define Package/phidget21/install
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(INSTALL_BIN) $(PKG_BUILD_DIR)/phidget21/libphidget21.so $(1)/usr/lib/
63 endef
64
65 define Package/phidget-service/install
66 $(INSTALL_DIR) $(1)/usr/bin
67 $(INSTALL_BIN) $(PKG_BUILD_DIR)/webservice/phidgetwebservice21 $(1)/usr/bin/
68 endef
69
70
71 $(eval $(call BuildPackage,phidget21))
72 $(eval $(call BuildPackage,phidget-service))