Root/ben-wpan/Makefile

1#
2# This is free software, licensed under the GNU General Public License v2.
3# See /LICENSE for more information.
4
5include $(TOPDIR)/rules.mk
6
7PKG_NAME:=ben-wpan
8PKG_VERSION:=git
9PKG_REV:=ac76df901d347c1cdb414644ad33120fd262729f
10PKG_RELEASE:=2
11
12PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
13PKG_SOURCE_URL:=git://projects.qi-hardware.com/ben-wpan.git
14PKG_SOURCE_PROTO:=git
15PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
16PKG_SOURCE_VERSION:=$(PKG_REV)
17
18PKG_BUILD_DEPENDS:=lowpan-tools
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/ben-wpan/Default
23    SECTION:=network
24    CATEGORY:=Network
25    SUBMENU:=ben-wpan
26    URL:=http://en.qi-hardware.com/wiki/Ben_WPAN
27endef
28
29ifneq ($(CONFIG_TARGET_xburst_qi_lb60),)
30    BEN_WPAN_MAKE_ARGS=V=1 TARGET=ben_openwrt
31else
32# If you compile under other target please manually disable those package under 'menuconfig'
33# atrf-rssi atrf-path atrf-xtal
34# this need more work on DEPENDS work, like the dirtpan DEPENDS below.
35    BEN_WPAN_MAKE_ARGS=NOGUI=1 V=1 CC_host=$(TARGET_CC)
36endif
37
38define Build/Compile
39    $(MAKE) -C $(PKG_BUILD_DIR)/tools $(BEN_WPAN_MAKE_ARGS) && \
40    $(MAKE) -C $(PKG_BUILD_DIR)/tools/dirtpan $(BEN_WPAN_MAKE_ARGS) CFLAGS+="-I$(STAGING_DIR)/usr/include -I../include"
41endef
42
43define Package/ben-wpan-doc
44    $(call Package/ben-wpan/Default)
45    TITLE:=Documents about ben-wpan
46endef
47
48define Package/ben-wpan-doc/install
49    $(INSTALL_DIR) $(1)/usr/share/ben-wpan
50    $(CP) $(PKG_BUILD_DIR)/install/INSTALL* $(1)/usr/share/ben-wpan
51    $(CP) $(PKG_BUILD_DIR)/install/USAGE $(1)/usr/share/ben-wpan
52endef
53
54define Package/atrf-gpio
55    $(call Package/ben-wpan/Default)
56    TITLE:=GPIO test utility
57endef
58
59define Package/atrf-gpio/install
60    $(INSTALL_DIR) $(1)/usr/sbin
61    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-gpio/atrf-gpio $(1)/usr/sbin/
62endef
63
64define Package/atrf-id
65    $(call Package/ben-wpan/Default)
66    TITLE:=ATRF identification utility
67endef
68
69define Package/atrf-id/install
70    $(INSTALL_DIR) $(1)/usr/sbin
71    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-id/atrf-id $(1)/usr/sbin/
72endef
73
74define Package/atrf-path
75    $(call Package/ben-wpan/Default)
76    TITLE:=Measure path characteristics
77endef
78
79define Package/atrf-path/install
80    $(INSTALL_DIR) $(1)/usr/sbin
81    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-path/atrf-path $(1)/usr/sbin/
82endef
83
84define Package/atrf-proxy
85    $(call Package/ben-wpan/Default)
86    TITLE:=ATRF network proxy
87endef
88
89define Package/atrf-proxy/install
90    $(INSTALL_DIR) $(1)/usr/sbin
91    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-proxy/atrf-proxy $(1)/usr/sbin/
92endef
93
94define Package/atrf-reset
95    $(call Package/ben-wpan/Default)
96    TITLE:=Reset the transceiver or the whole board
97endef
98
99define Package/atrf-reset/install
100    $(INSTALL_DIR) $(1)/usr/sbin
101    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-reset/atrf-reset $(1)/usr/sbin/
102endef
103
104define Package/atrf-rssi
105    $(call Package/ben-wpan/Default)
106    TITLE:=Spectrum scan utility
107endef
108
109define Package/atrf-rssi/install
110    $(INSTALL_DIR) $(1)/usr/sbin
111    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-rssi/atrf-rssi $(1)/usr/sbin/
112endef
113
114define Package/atrf-trim
115    $(call Package/ben-wpan/Default)
116    TITLE:=Oscillator trim utility
117endef
118
119define Package/atrf-trim/install
120    $(INSTALL_DIR) $(1)/usr/sbin
121    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-trim/atrf-trim $(1)/usr/sbin/
122endef
123
124define Package/atrf-txrx
125    $(call Package/ben-wpan/Default)
126    TITLE:=TX/RX test utility
127endef
128
129define Package/atrf-txrx/install
130    $(INSTALL_DIR) $(1)/usr/sbin
131    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-txrx/atrf-txrx $(1)/usr/sbin/
132endef
133
134define Package/atrf-xmit
135    $(call Package/ben-wpan/Default)
136    TITLE:=Fast transmission test
137endef
138
139define Package/atrf-xmit/install
140    $(INSTALL_DIR) $(1)/usr/sbin
141    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-xmit/atrf-xmit $(1)/usr/sbin/
142endef
143
144define Package/atrf-xtal
145    $(call Package/ben-wpan/Default)
146    TITLE:=Crystal diagnostic utility
147endef
148
149define Package/atrf-xtal/install
150    $(INSTALL_DIR) $(1)/usr/sbin
151    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/atrf-xtal/atrf-xtal $(1)/usr/sbin/
152endef
153
154define Package/dirtpan
155    $(call Package/ben-wpan/Default)
156    TITLE:=Quick and dirty IPv4 over 802.15.4 tunnel
157    DEPENDS:=$(if $(CONFIG_TARGET_xburst_qi_lb60),,+libusb)
158endef
159
160define Package/dirtpan/install
161    $(INSTALL_DIR) $(1)/usr/sbin
162    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/dirtpan/dirtpan $(1)/usr/sbin/
163endef
164
165$(eval $(call BuildPackage,dirtpan))
166$(eval $(call BuildPackage,atrf-gpio))
167$(eval $(call BuildPackage,atrf-id))
168$(eval $(call BuildPackage,atrf-path))
169$(eval $(call BuildPackage,atrf-proxy))
170$(eval $(call BuildPackage,atrf-reset))
171$(eval $(call BuildPackage,atrf-rssi))
172$(eval $(call BuildPackage,atrf-trim))
173$(eval $(call BuildPackage,atrf-txrx))
174$(eval $(call BuildPackage,atrf-xmit))
175$(eval $(call BuildPackage,atrf-xtal))
176$(eval $(call BuildPackage,ben-wpan-doc))
177

Archive Download this file



interactive