2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
12 PKG_NAME
:=broadcom-diag
15 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)
17 include $(INCLUDE_DIR
)/package.mk
19 define KernelPackage
/diag
20 SUBMENU
:=Other modules
21 DEPENDS
:=@LINUX_2_4_BRCM||LINUX_2_6_BRCM||LINUX_2_6_BRCM47XX
22 TITLE
:=Driver for router LEDs and Buttons
23 FILES
:=$(PKG_BUILD_DIR
)/diag.
$(LINUX_KMOD_SUFFIX
)
27 mkdir
-p
$(PKG_BUILD_DIR
)
28 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
32 BUILDFLAGS
=-DBCMDRIVER
-I
$(LINUX_DIR
)/arch
/mips
/bcm947xx
/include $(if
$(CONFIG_LINUX_2_4
),-DLINUX_2_4
)
36 $(MAKE
) -C
"$(LINUX_DIR)" \
37 CROSS_COMPILE
="$(TARGET_CROSS)" \
38 ARCH
="$(LINUX_KARCH)" \
39 SUBDIRS
="$(PKG_BUILD_DIR)" \
40 EXTRA_CFLAGS
="$(BUILDFLAGS)" \
44 $(eval
$(call KernelPackage
,diag
))