Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #
  2. # Copyright (C) 2012 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:=trelay
  10. PKG_RELEASE:=2
  11. include $(INCLUDE_DIR)/package.mk
  12. define KernelPackage/trelay
  13. SUBMENU:=Network Support
  14. TITLE:=Trivial Ethernet Relay
  15. FILES:=$(PKG_BUILD_DIR)/trelay.ko
  16. AUTOLOAD:=$(call AutoLoad,50,trelay)
  17. endef
  18. define KernelPackage/trelay/description
  19. trelay relays ethernet packets between two devices (similar to a bridge), but
  20. without any MAC address checks. This makes it possible to bridge client mode
  21. or ad-hoc mode wifi devices to ethernet VLANs, assuming the remote end uses
  22. the same source MAC address as the device that packets are supposed to exit
  23. from.
  24. endef
  25. include $(INCLUDE_DIR)/kernel-defaults.mk
  26. define Build/Compile
  27. $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules
  28. endef
  29. define KernelPackage/trelay/conffiles
  30. /etc/config/trelay
  31. endef
  32. define KernelPackage/trelay/install
  33. $(INSTALL_DIR) $(1)/etc/hotplug.d/net $(1)/etc/init.d $(1)/etc/config
  34. $(INSTALL_CONF) ./files/trelay.hotplug $(1)/etc/hotplug.d/net/50-trelay
  35. $(INSTALL_BIN) ./files/trelay.init $(1)/etc/init.d/trelay
  36. $(INSTALL_CONF) ./files/trelay.config $(1)/etc/config/trelay
  37. endef
  38. $(eval $(call KernelPackage,trelay))