package Makefile cleanup: remove uneeded vars
[openwrt.git] / package / switch / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=kmod-switch
13 PKG_RELEASE:=1
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define KernelPackage/switch
18 SUBMENU:=Other modules
19 DEPENDS:=@LINUX_2_6_BRCM||LINUX_2_4_BRCM||LINUX_2_6_BRCM47XX
20 TITLE:=Switch drivers
21 DESCRIPTION:=\
22 This package contains switch drivers for ADM6996L and BCM53XX RoboSwitch.
23 FILES:= \
24 $(PKG_BUILD_DIR)/switch-core.$(LINUX_KMOD_SUFFIX) \
25 $(PKG_BUILD_DIR)/switch-adm.$(LINUX_KMOD_SUFFIX) \
26 $(PKG_BUILD_DIR)/switch-robo.$(LINUX_KMOD_SUFFIX)
27 AUTOLOAD:=$(call AutoLoad,20,switch-core switch-robo switch-adm)
28 endef
29
30 define Build/Prepare
31 mkdir -p $(PKG_BUILD_DIR)
32 $(CP) ./src/* $(PKG_BUILD_DIR)/
33 endef
34
35 ifeq ($(BOARD),brcm)
36 BUILDFLAGS := -DBROADCOM -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include
37 else
38 ifeq ($(BOARD),brcm47xx)
39 BUILDFLAGS := -DBROADCOM
40 endif
41 endif
42
43
44 define Build/Compile
45 $(MAKE) -C "$(LINUX_DIR)" \
46 CROSS_COMPILE="$(TARGET_CROSS)" \
47 ARCH="$(LINUX_KARCH)" \
48 SUBDIRS="$(PKG_BUILD_DIR)" \
49 EXTRA_CFLAGS="$(BUILDFLAGS)" \
50 modules
51 endef
52
53 define KernelPackage/switch/install
54 $(INSTALL_DIR) $(1)/lib/network/
55 $(INSTALL_BIN) ./files/switch.sh $(1)/lib/network/
56 endef
57
58 $(eval $(call KernelPackage,switch))
This page took 0.046238 seconds and 5 git commands to generate.