Makefile 889 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #
  2. # Copyright (C) 2008 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:=gpioctl
  10. PKG_RELEASE:=1
  11. PKG_VERSION:=1.0
  12. include $(INCLUDE_DIR)/package.mk
  13. define Package/gpioctl
  14. SECTION:=utils
  15. CATEGORY:=Utilities
  16. TITLE:=Tool for controlling gpio pins
  17. DEPENDS:=@GPIO_SUPPORT
  18. endef
  19. define Package/gpioctl/description
  20. Tool for controlling gpio pins
  21. endef
  22. define Build/Prepare
  23. mkdir -p $(PKG_BUILD_DIR)
  24. $(CP) ./src/* $(PKG_BUILD_DIR)/
  25. endef
  26. define Build/Compile
  27. $(MAKE) -C $(PKG_BUILD_DIR) \
  28. $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_DIR)/include"
  29. endef
  30. define Package/gpioctl/install
  31. $(INSTALL_DIR) $(1)/usr/bin
  32. $(INSTALL_BIN) $(PKG_BUILD_DIR)/gpioctl $(1)/usr/bin/
  33. endef
  34. $(eval $(call BuildPackage,gpioctl))