Makefile 984 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=spidev-test
  10. PKG_RELEASE:=$(LINUX_VERSION)
  11. include $(INCLUDE_DIR)/package.mk
  12. define Package/spidev-test
  13. SECTION:=utils
  14. CATEGORY:=Utilities
  15. DEPENDS:=+kmod-spi-dev
  16. TITLE:=SPI testing utility
  17. VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
  18. URL:=http://www.kernel.org
  19. MAINTAINER:=Florian Fainelli <[email protected]>
  20. endef
  21. define Package/spidev-test/description
  22. SPI testing utility.
  23. endef
  24. define Build/Prepare
  25. $(CP) src/spidev_test.c $(PKG_BUILD_DIR)/
  26. endef
  27. define Build/Compile
  28. $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/spidev_test \
  29. $(PKG_BUILD_DIR)/spidev_test.c
  30. endef
  31. define Package/spidev-test/install
  32. $(INSTALL_DIR) $(1)/sbin
  33. $(INSTALL_BIN) $(PKG_BUILD_DIR)/spidev_test $(1)/sbin/
  34. endef
  35. $(eval $(call BuildPackage,spidev-test))