Makefile 896 B

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