source: trunk/package/spi-ks8995/Makefile @ 12419

Last change on this file since 12419 was 12419, checked in by nbd, 8 years ago

add autoload for spi-ks8995

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1#
2# Copyright (C) 2008 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=spi-ks8995
12PKG_RELEASE:=1
13
14include $(INCLUDE_DIR)/package.mk
15
16define KernelPackage/spi-ks8995
17  SUBMENU:=Other modules
18  TITLE:=Micrel/Kendin KS8995 Ethernet switch control
19  DEPENDS:=@LINUX_2_6
20  FILES:=$(PKG_BUILD_DIR)/spi_ks8995.$(LINUX_KMOD_SUFFIX)
21  KCONFIG:=CONFIG_SPI=y \
22        CONFIG_SPI_MASTER=y
23  AUTOLOAD:=$(call AutoLoad,50,spi_ks8995)
24endef
25
26define KernelPackage/spi-ks8995/description
27  Kernel module for Micrel/Kendin KS8995 ethernet switch
28endef
29
30EXTRA_KCONFIG:= \
31        CONFIG_SPI_KS8995=m
32
33EXTRA_CFLAGS:= \
34        $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
35        $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
36
37MAKE_OPTS:= \
38        ARCH="$(LINUX_KARCH)" \
39        CROSS_COMPILE="$(TARGET_CROSS)" \
40        SUBDIRS="$(PKG_BUILD_DIR)" \
41        EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
42        LINUXINCLUDE="-I$(LINUX_DIR)/include -include linux/autoconf.h" \
43        $(EXTRA_KCONFIG)
44
45define Build/Prepare
46        mkdir -p $(PKG_BUILD_DIR)
47        $(CP) ./src/* $(PKG_BUILD_DIR)/
48endef
49
50define Build/Compile
51        $(MAKE) -C "$(LINUX_DIR)" \
52                $(MAKE_OPTS) \
53                modules
54endef
55
56$(eval $(call KernelPackage,spi-ks8995))
Note: See TracBrowser for help on using the repository browser.