fix jffs2root compile
[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 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/kmod-switch
20 SECTION:=kernel
21 CATEGORY:=Kernel drivers
22 DEPENDS:=@LINUX_2_6_BRCM||LINUX_2_4_BRCM
23 DEFAULT:=y
24 TITLE:=Switch drivers
25 DESCRIPTION:=\
26 This package contains switch drivers for ADM6996L and BCM53XX RoboSwitch.
27 VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
28 endef
29
30 define Build/Prepare
31 mkdir -p $(PKG_BUILD_DIR)
32 $(CP) ./src/* $(PKG_BUILD_DIR)/
33 endef
34
35 define Build/Compile
36 $(MAKE) -C "$(LINUX_DIR)" \
37 CROSS_COMPILE="$(TARGET_CROSS)" \
38 ARCH="$(LINUX_KARCH)" \
39 SUBDIRS="$(PKG_BUILD_DIR)" \
40 EXTRA_CFLAGS="-DBCMGPIO2" \
41 modules
42 endef
43
44 define Package/kmod-switch/install
45 install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
46 $(CP) $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \
47 $(1)/lib/modules/$(LINUX_VERSION)
48 install -m0755 -d $(1)/lib/network/
49 install -m0755 ./files/switch.sh $(1)/lib/network/
50 install -m0755 -d $(1)/etc/modules.d/
51 printf 'switch-core\nswitch-robo\nswitch-adm\n' > $(1)/etc/modules.d/20-switch
52 endef
53
54 $(eval $(call BuildPackage,kmod-switch))
This page took 0.038246 seconds and 5 git commands to generate.