631ef0dd2407628ceb479c94961a1a50d8856019
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 include $(INCLUDE_DIR
)/package.mk
16 define Package
/spidev-test
19 DEPENDS
:=+kmod-spi-dev
20 TITLE
:=SPI testing utility
21 VERSION
:=$(LINUX_VERSION
)-$(PKG_RELEASE
)
22 URL
:=http
://www.kernel.org
23 MAINTAINER
:=Florian Fainelli
<florian@openwrt.org
>
26 define Package
/spidev-test
/description
33 # requires 214-spidev_h_portability.patch
34 # or linux/ioctl.h include on musl
37 ifneq ($(CONFIG_LINUX_3_18
)$(CONFIG_LINUX_4_1
)$(CONFIG_LINUX_4_4
),y
)
38 $(TARGET_CC
) $(TARGET_CFLAGS
) -o
$(PKG_BUILD_DIR
)/spidev_test \
39 $(LINUX_DIR
)/tools
/spi
/spidev_test.c
41 $(TARGET_CC
) $(TARGET_CFLAGS
) -o
$(PKG_BUILD_DIR
)/spidev_test \
42 $(LINUX_DIR
)/Documentation
/spi
/spidev_test.c
47 define Package
/spidev-test
/install
48 $(INSTALL_DIR
) $(1)/sbin
49 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/spidev_test
$(1)/sbin
/
52 $(eval
$(call BuildPackage
,spidev-test
))