Root/package/broadcom-diag/Makefile

1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=broadcom-diag
12PKG_RELEASE:=7.1
13
14include $(INCLUDE_DIR)/package.mk
15
16define KernelPackage/diag
17  SUBMENU:=Other modules
18  DEPENDS:=@TARGET_brcm_2_4||TARGET_brcm47xx
19  TITLE:=Driver for router LEDs and Buttons
20  FILES:=$(PKG_BUILD_DIR)/diag.$(LINUX_KMOD_SUFFIX)
21endef
22
23define Build/Prepare
24    mkdir -p $(PKG_BUILD_DIR)
25    $(CP) ./src/* $(PKG_BUILD_DIR)/
26endef
27
28ifeq ($(BOARD),brcm-2.4)
29    BUILDFLAGS=-DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DLINUX_2_4
30endif
31
32define Build/Compile
33    $(MAKE) -C "$(LINUX_DIR)" \
34        CROSS_COMPILE="$(TARGET_CROSS)" \
35        ARCH="$(LINUX_KARCH)" \
36        SUBDIRS="$(PKG_BUILD_DIR)" \
37        EXTRA_CFLAGS="$(BUILDFLAGS)" \
38        modules
39endef
40
41$(eval $(call KernelPackage,diag))
42

Archive Download this file



interactive