diff options
Diffstat (limited to 'package/utils/spidev_test/Makefile')
-rw-r--r-- | package/utils/spidev_test/Makefile | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/package/utils/spidev_test/Makefile b/package/utils/spidev_test/Makefile index 807039a1f5..2a2122cfbd 100644 --- a/package/utils/spidev_test/Makefile +++ b/package/utils/spidev_test/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009 OpenWrt.org +# Copyright (C) 2009-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,6 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=spidev-test -PKG_RELEASE:=$(LINUX_VERSION) include $(INCLUDE_DIR)/package.mk @@ -18,21 +17,26 @@ define Package/spidev-test CATEGORY:=Utilities DEPENDS:=+kmod-spi-dev TITLE:=SPI testing utility - VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE) + VERSION:=$(LINUX_VERSION) URL:=http://www.kernel.org - MAINTAINER:=Florian Fainelli <florian@openwrt.org> endef define Package/spidev-test/description SPI testing utility. endef +ifeq ($(call kernel_patchver_ge,4.5.0),1) + SPIDEV_TEST_C:=$(LINUX_DIR)/tools/spi/spidev_test.c +else + SPIDEV_TEST_C:=$(LINUX_DIR)/Documentation/spi/spidev_test.c +endif + define Build/Prepare endef define Build/Compile $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/spidev_test \ - $(LINUX_DIR)/Documentation/spi/spidev_test.c + $(SPIDEV_TEST_C) endef define Package/spidev-test/install |