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
9 include $(INCLUDE_DIR
)/kernel.mk
12 PKG_RELEASE
:=$(LINUX_VERSION
)
14 PKG_BUILD_DIR
:=$(LINUX_DIR
)/tools
/spi-
$(TARGET_DIR_NAME
)
17 include $(INCLUDE_DIR
)/package.mk
19 define Package
/spidev-test
22 DEPENDS
:=+kmod-spi-dev @
!IN_SDK
23 TITLE
:=SPI testing utility
24 VERSION
:=$(LINUX_VERSION
)-$(PKG_RELEASE
)
25 URL
:=http
://www.kernel.org
28 define Package
/spidev-test
/description
33 $(CP
) $(LINUX_DIR
)/tools
/spi
/* $(PKG_BUILD_DIR
)/
37 ARCH
="$(LINUX_KARCH)" \
38 CROSS_COMPILE
="$(TARGET_CROSS)" \
40 LD
="$(TARGET_CROSS)ld" \
41 CFLAGS
="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
42 LDFLAGS
="$(TARGET_LDFLAGS)" \
43 $(if
$(findstring c
,$(OPENWRT_VERBOSE
)),V
=1,V
='') \
48 +$(MAKE_FLAGS
) $(MAKE
) $(PKG_JOBS
) \
54 define Package
/spidev-test
/install
55 $(INSTALL_DIR
) $(1)/sbin
56 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/spidev_test
$(1)/sbin
/
59 $(eval
$(call BuildPackage
,spidev-test
))