summaryrefslogtreecommitdiffstats
path: root/package/gpio_rtl819x/Makefile
diff options
context:
space:
mode:
authorArtur Artamonov <freeartman@wechall.net>2013-09-19 12:15:23 +0300
committerArtur Artamonov <freeartman@wechall.net>2013-09-19 12:15:23 +0300
commit55e15136748e0f6be88c008b5afc0e5623c35b96 (patch)
tree3ff6fbeff40b26195d9da021a7cfe96c38bba687 /package/gpio_rtl819x/Makefile
parent178f5c8a01fbc67d6512f6f99d10cf0e111781bb (diff)
[gpio] gpio_rtl819x compiles with 96c/96d/96d/88 should work on all of them
Diffstat (limited to 'package/gpio_rtl819x/Makefile')
-rw-r--r--package/gpio_rtl819x/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/package/gpio_rtl819x/Makefile b/package/gpio_rtl819x/Makefile
new file mode 100644
index 000000000..3795fa92e
--- /dev/null
+++ b/package/gpio_rtl819x/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2011 Roman Yeryomin <roman@advem.lv>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=gpio_rtl819x
+PKG_VERSION:=0.0.2
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/gpio_rtl819x
+ SUBMENU:=gpio_rtl819x
+ TITLE:=gpio_rtl819x
+ FILES:=$(PKG_BUILD_DIR)/gpio_rtl819x.ko
+ DEPENDS:=
+ #KCONFIG:=
+ KCONFIG:=CONFIG_GPIO_RTL819X=y CONFIG_GPIOLIB=y CONFIG_GENERIC_GPIO=y CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+ #AUTOLOAD:=$(call AutoLoad,01,sigb in)
+endef
+
+define KernelPackage/gpio_rtl8196c/description
+ GPIO for Realtek rtl8196c
+endef
+
+EXTRA_KCONFIG:=CONFIG_GPIO_RTL819X=y
+EXTRA_KCONFIG+=CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+EXTRA_KCONFIG+=CONFIG_ARCH_REQUIRE_GPIOLIB=y
+EXTRA_KCONFIG+=CONFIG_GENERIC_GPIO=y
+EXTRA_KCONFIG+=CONFIG_GPIOLIB=y
+
+EXTRA_CFLAGS:= \
+ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
+ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG))))
+
+MAKE_OPTS:= \
+ ARCH="$(LINUX_KARCH)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ SUBDIRS="$(PKG_BUILD_DIR)" \
+ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+ $(EXTRA_KCONFIG)
+# MVER="-DMODULE -DMODVERSIONS -DEXPORT_SYMTAB"
+
+
+define Build/Prepare
+ mkdir -p $(PKG_BUILD_DIR)
+ $(CP) ./src/* $(PKG_BUILD_DIR)/
+endef
+
+define Build/Compile
+ $(MAKE) -C "$(LINUX_DIR)" \
+ $(MAKE_OPTS) \
+ modules
+ $(CP) $(PKG_BUILD_DIR)/gpio_rtl819x.ko /tmp
+endef
+
+$(eval $(call KernelPackage,gpio_rtl819x))