2 # Copyright (C) 2006-2012 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
14 include $(INCLUDE_DIR
)/package.mk
16 define KernelPackage
/switch
17 SUBMENU
:=Other modules
18 DEPENDS
:=@TARGET_brcm47xx||TARGET_brcm63xx
21 $(PKG_BUILD_DIR
)/switch-core.ko \
22 $(PKG_BUILD_DIR
)/switch-adm.ko \
23 $(PKG_BUILD_DIR
)/switch-robo.ko
24 AUTOLOAD
:=$(call AutoLoad
,20,switch-core switch-robo switch-adm
)
27 define KernelPackage
/switch
/description
28 This package contains switch drivers for ADM6996L and BCM53XX RoboSwitch.
32 mkdir
-p
$(PKG_BUILD_DIR
)
33 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
37 $(MAKE
) -C
"$(LINUX_DIR)" \
38 CROSS_COMPILE
="$(TARGET_CROSS)" \
39 ARCH
="$(LINUX_KARCH)" \
40 SUBDIRS
="$(PKG_BUILD_DIR)" \
41 EXTRA_CFLAGS
="$(BUILDFLAGS)" \
45 define Build
/InstallDev
46 mkdir
-p
$(1)/usr
/include
47 $(CP
) .
/src
/switch-core.h
$(1)/usr
/include/
50 define Build
/UninstallDev
51 rm -f
$(1)/usr
/include/switch-core.h
54 define KernelPackage
/switch
/install
55 $(INSTALL_DIR
) $(1)/lib
/network
/
56 $(INSTALL_BIN
) .
/files
/switch.sh
$(1)/lib
/network
/
59 $(eval
$(call KernelPackage
,switch
))