2 # Copyright (C) 2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
11 PKG_NAME
:=pwm-gpio-custom
14 include $(INCLUDE_DIR
)/package.mk
16 define KernelPackage
/pwm-gpio-custom
17 SUBMENU
:=Other modules
18 TITLE
:=Custom GPIO-based PWM device
19 DEPENDS
:=+kmod-pwm-gpio
20 FILES
:=$(PKG_BUILD_DIR
)/pwm-gpio-custom.ko
24 define KernelPackage
/pwm-gpio-custom
/description
25 Kernel module to register a custom pwm-gpio platform device.
29 CONFIG_PWM_GPIO_CUSTOM
=m
32 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=m
,%,$(filter %=m
,$(EXTRA_KCONFIG
)))) \
33 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=y
,%,$(filter %=y
,$(EXTRA_KCONFIG
))))
36 ARCH
="$(LINUX_KARCH)" \
37 CROSS_COMPILE
="$(TARGET_CROSS)" \
38 SUBDIRS
="$(PKG_BUILD_DIR)" \
39 EXTRA_CFLAGS
="$(EXTRA_CFLAGS)" \
43 mkdir
-p
$(PKG_BUILD_DIR
)
44 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
48 $(MAKE
) -C
"$(LINUX_DIR)" \
53 $(eval
$(call KernelPackage
,pwm-gpio-custom
))