source: trunk/package/switch/Makefile @ 25619

Last change on this file since 25619 was 25619, checked in by florian, 5 years ago

[package] switch: fix switch-robo device reference counting

Fix incorrect device reference counting by switch-robo.

Signed-off-by: George Kashperko <george@…>

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1#
2# Copyright (C) 2006-2011 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:=kmod-switch
12PKG_RELEASE:=4
13
14include $(INCLUDE_DIR)/package.mk
15
16define KernelPackage/switch
17  SUBMENU:=Other modules
18  DEPENDS:=@TARGET_brcm47xx||TARGET_brcm63xx
19  TITLE:=Switch drivers
20  FILES:= \
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)
25endef
26
27define KernelPackage/switch/description
28 This package contains switch drivers for ADM6996L and BCM53XX RoboSwitch.
29endef
30
31define Build/Prepare
32        mkdir -p $(PKG_BUILD_DIR)
33        $(CP) ./src/* $(PKG_BUILD_DIR)/
34endef
35
36ifeq ($(BOARD),brcm47xx)
37    BUILDFLAGS := -DBROADCOM
38endif
39
40define Build/Compile
41        $(MAKE) -C "$(LINUX_DIR)" \
42                CROSS_COMPILE="$(TARGET_CROSS)" \
43                ARCH="$(LINUX_KARCH)" \
44                SUBDIRS="$(PKG_BUILD_DIR)" \
45                EXTRA_CFLAGS="$(BUILDFLAGS)" \
46                modules
47endef
48
49define Build/InstallDev
50        mkdir -p $(1)/usr/include
51        $(CP) ./src/switch-core.h $(1)/usr/include/
52endef
53
54define Build/UninstallDev
55        rm -f $(1)/usr/include/switch-core.h
56endef
57
58define KernelPackage/switch/install
59        $(INSTALL_DIR) $(1)/lib/network/
60        $(INSTALL_BIN) ./files/switch.sh $(1)/lib/network/
61endef
62
63$(eval $(call KernelPackage,switch))
Note: See TracBrowser for help on using the repository browser.