1
0

Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # Copyright (C) 2017 Chris Blake <chrisrblake93@gmail.com>
  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:=leds-apu2
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Chris Blake <chrisrblake93@gmail.com>
  12. PKG_LICENSE:=GPL-2.0
  13. include $(INCLUDE_DIR)/package.mk
  14. define KernelPackage/leds-apu2
  15. SUBMENU:=LED modules
  16. TITLE:= PC Engines APU2/APU3 LED support
  17. DEPENDS:= @GPIO_SUPPORT @TARGET_x86
  18. FILES:=$(PKG_BUILD_DIR)/leds-apu2.ko
  19. AUTOLOAD:=$(call AutoLoad,41,leds-apu2,1)
  20. KCONFIG:=
  21. endef
  22. define KernelPackage/leds-apu2/description
  23. Driver for the PC Engines APU2/APU3 LEDs & Reset Button.
  24. endef
  25. EXTRA_KCONFIG:= \
  26. CONFIG_LEDS_APU2=m
  27. EXTRA_CFLAGS:= \
  28. $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
  29. $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
  30. MAKE_OPTS:= \
  31. $(KERNEL_MAKE_FLAGS) \
  32. SUBDIRS="$(PKG_BUILD_DIR)" \
  33. EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
  34. $(EXTRA_KCONFIG)
  35. define Build/Compile
  36. $(MAKE) -C "$(LINUX_DIR)" \
  37. $(MAKE_OPTS) \
  38. modules
  39. endef
  40. $(eval $(call KernelPackage,leds-apu2))