2 # Copyright (C) 2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=2.1.6.20091105
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
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/phidget21
25 URL
:=http
://www.phidgets.com
/
28 define Package
/phidget21
/description
29 The Phidget API library.
32 define Package
/phidget-service
35 TITLE
:=Phidget Web Service
36 URL
:=http
://www.phidgets.com
/
40 define Package
/phidget-service
/description
41 The Phidget Web Service.
44 define Build
/Configure
45 $(INSTALL_DIR
) $(PKG_INSTALL_DIR
)/usr
/include/
46 $(INSTALL_DIR
) $(PKG_INSTALL_DIR
)/usr
/lib
/
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
="" \
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" \
59 $(MAKE
) -C
$(PKG_BUILD_DIR
)/webservice \
60 $(TARGET_CONFIGURE_OPTS
) LDCONFIG
="true" \
61 LIBS
="-lphidget21 -lpthread -ldl -L../phidget21" \
62 CFLAGS
="$(TARGET_CFLAGS) -static -D_LINUX -I. -I../phidget21 -I../phidget21/utils" \
66 define Build
/InstallDev
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
/
74 define Package
/phidget21
/install
75 $(INSTALL_DIR
) $(1)/usr
/lib
76 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/libphidget21.so
$(1)/usr
/lib
/
79 define Package
/phidget-service
/install
80 $(INSTALL_DIR
) $(1)/usr
/bin
81 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/webservice
/phidgetwebservice21
$(1)/usr
/bin
/
84 $(eval
$(call BuildPackage
,phidget21
))
85 $(eval
$(call BuildPackage
,phidget-service
))