Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #
  2. # Copyright (C) 2017 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:=gpio-nct5104d
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Florian Eckert <Eckert.Florian@googlemail.com>
  12. PKG_LICENSE:=GPL-2.0
  13. include $(INCLUDE_DIR)/package.mk
  14. define KernelPackage/gpio-nct5104d
  15. SUBMENU:=Other modules
  16. TITLE:= GPIO nct5104d support
  17. DEPENDS:= @GPIO_SUPPORT @TARGET_x86
  18. FILES:=$(PKG_BUILD_DIR)/gpio-nct5104d.ko
  19. AUTOLOAD:=$(call AutoLoad,30,gpio-nct5104d,1)
  20. KCONFIG:=
  21. endef
  22. define KernelPackage/gpio-nct5104d/description
  23. Support for GPIO functionality of NCT5104D super I/O chip.
  24. endef
  25. EXTRA_KCONFIG:= \
  26. CONFIG_GPIO_NCT5104D=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. ARCH="$(LINUX_KARCH)" \
  32. CROSS_COMPILE="$(TARGET_CROSS)" \
  33. SUBDIRS="$(PKG_BUILD_DIR)" \
  34. EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
  35. $(EXTRA_KCONFIG)
  36. define Build/Compile
  37. $(MAKE) -C "$(LINUX_DIR)" \
  38. $(MAKE_OPTS) \
  39. modules
  40. endef
  41. $(eval $(call KernelPackage,gpio-nct5104d))