[package] replace some -I & -L flags with $(TARGET_CPPFLAGS) & $(TARGET_LDFLAGS)...
[openwrt.git] / package / broadcom-57xx / 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: Makefile 8694 2007-09-08 19:55:42Z nbd $
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=broadcom-57xx
13 PKG_RELEASE:=1
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define KernelPackage/brcm-57xx
18 SUBMENU:=Network Devices
19 DEPENDS:=@TARGET_brcm_2_4 +kmod-switch
20 TITLE:=Broadcom 57xx ethernet support
21 FILES:=$(PKG_BUILD_DIR)/bcm57xx.$(LINUX_KMOD_SUFFIX)
22 AUTOLOAD:=$(call AutoLoad,30,bcm57xx)
23 endef
24
25 define Build/Prepare
26 mkdir -p $(PKG_BUILD_DIR)
27 $(CP) ./src/* $(PKG_BUILD_DIR)/
28 endef
29
30 ifeq ($(BOARD),brcm-2.4)
31 BUILDFLAGS := \
32 -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include $(TARGET_CPPFLAGS) \
33 -DDBG=0 -DBCM_PROC_FS=1 -DT3_JUMBO_RCV_RCB_ENTRY_COUNT=256 -DNICE_SUPPORT \
34 -DPCIX_TARGET_WORKAROUND=1 -DINCLUDE_TBI_SUPPORT=1 -DINCLUDE_5701_AX_FIX=1
35 endif
36
37 define Build/Compile
38 $(MAKE) -C "$(LINUX_DIR)" \
39 CROSS_COMPILE="$(TARGET_CROSS)" \
40 ARCH="$(LINUX_KARCH)" \
41 SUBDIRS="$(PKG_BUILD_DIR)" \
42 EXTRA_CFLAGS="$(BUILDFLAGS)" \
43 modules
44 endef
45
46 define KernelPackage/brcm-57xx/install
47 $(call Package/brcm-57xx/install/Default,$(1))
48 #$(INSTALL_DIR) $(1)/etc/modules.d
49 #echo "bcm57xx activate_gpio=1" > $(1)/etc/modules.d/30-bcm57xx
50 endef
51
52 $(eval $(call KernelPackage,brcm-57xx))
This page took 0.040796 seconds and 5 git commands to generate.