package/kernel: allow additional dependencies as arguments to AddDepends macros
[openwrt.git] / package / broadcom-57xx / Makefile
1 #
2 # Copyright (C) 2008-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=broadcom-57xx
12 PKG_RELEASE:=2
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define KernelPackage/brcm-57xx
17 SUBMENU:=Network Devices
18 DEPENDS:=@TARGET_brcm_2_4 +kmod-switch
19 TITLE:=Broadcom 57xx ethernet support
20 FILES:=$(PKG_BUILD_DIR)/bcm57xx.$(LINUX_KMOD_SUFFIX)
21 AUTOLOAD:=$(call AutoLoad,30,bcm57xx)
22 endef
23
24 define Build/Prepare
25 mkdir -p $(PKG_BUILD_DIR)
26 $(CP) ./src/* $(PKG_BUILD_DIR)/
27 endef
28
29 ifeq ($(BOARD),brcm-2.4)
30 BUILDFLAGS := \
31 -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include $(TARGET_CPPFLAGS) \
32 -DDBG=0 -DBCM_PROC_FS=1 -DT3_JUMBO_RCV_RCB_ENTRY_COUNT=256 -DNICE_SUPPORT \
33 -DPCIX_TARGET_WORKAROUND=1 -DINCLUDE_TBI_SUPPORT=1 -DINCLUDE_5701_AX_FIX=1
34 endif
35
36 define Build/Compile
37 $(MAKE) -C "$(LINUX_DIR)" \
38 CROSS_COMPILE="$(TARGET_CROSS)" \
39 ARCH="$(LINUX_KARCH)" \
40 SUBDIRS="$(PKG_BUILD_DIR)" \
41 EXTRA_CFLAGS="$(BUILDFLAGS)" \
42 modules
43 endef
44
45 define KernelPackage/brcm-57xx/install
46 $(call Package/brcm-57xx/install/Default,$(1))
47 #$(INSTALL_DIR) $(1)/etc/modules.d
48 #echo "bcm57xx activate_gpio=1" > $(1)/etc/modules.d/30-bcm57xx
49 endef
50
51 $(eval $(call KernelPackage,brcm-57xx))
This page took 0.044122 seconds and 5 git commands to generate.