procd: make mDNS TXT record parsing more solid
[openwrt/openwrt.git] / package / utils / spidev_test / 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 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=spidev-test
12 PKG_RELEASE:=$(LINUX_VERSION)
13 PKG_BUILD_DIR:=$(LINUX_DIR)/tools/spi-$(TARGET_DIR_NAME)
14 PKG_BUILD_PARALLEL:=1
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define Package/spidev-test
19 SECTION:=utils
20 CATEGORY:=Utilities
21 DEPENDS:=+kmod-spi-dev
22 TITLE:=SPI testing utility
23 VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
24 URL:=http://www.kernel.org
25 endef
26
27 define Package/spidev-test/description
28 SPI testing utility.
29 endef
30
31 define Build/Prepare
32 # For SDK: Sources are copied by target/sdk/Makefile's
33 # USERSPACE_UTILS(_FILES)
34 $(CP) $(LINUX_DIR)/tools/spi/* $(PKG_BUILD_DIR)/
35 endef
36
37 MAKE_FLAGS = \
38 ARCH="$(LINUX_KARCH)" \
39 CROSS_COMPILE="$(TARGET_CROSS)" \
40 CC="$(TARGET_CC)" \
41 LD="$(TARGET_CROSS)ld" \
42 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
43 LDFLAGS="$(TARGET_LDFLAGS)" \
44 $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
45 WERROR=0 \
46 prefix=/usr
47
48 define Build/Compile
49 +$(MAKE_FLAGS) $(MAKE) $(PKG_JOBS) \
50 -C $(PKG_BUILD_DIR) \
51 -f Makefile \
52 --no-print-directory
53 endef
54
55 define Package/spidev-test/install
56 $(INSTALL_DIR) $(1)/sbin
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/spidev_test $(1)/sbin/
58 endef
59
60 $(eval $(call BuildPackage,spidev-test))