fix user mode linux toolchain build
[openwrt.git] / package / wlcompat / 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-wlcompat
13 PKG_RELEASE:=4
14
15 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/kmod-wlcompat/Default
20 SECTION:=kernel
21 CATEGORY:=Kernel drivers
22 DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo +wireless-tools
23 TITLE:=Broadcom wl wrapper module
24 DESCRIPTION:=\
25 This package contains a wrapper module, that provides Wireless Extension \\\
26 support for the proprietary Broadcom wl module.
27 VERSION:=$(LINUX_VERSION)+$(BOARD)-$(PKG_RELEASE)
28 endef
29
30 define Package/kmod-wlcompat
31 $(call Package/kmod-wlcompat/Default)
32 endef
33
34 define Package/kmod-wlcompat-debug
35 $(call Package/kmod-wlcompat/Default)
36 TITLE+= (debug)
37 DESCRIPTION+=\\\
38 \\\
39 This is a debugging version.
40 endef
41
42 define Build/Prepare
43 mkdir -p $(PKG_BUILD_DIR)
44 $(CP) ./src/* $(PKG_BUILD_DIR)/
45 endef
46
47 define Build/Compile
48 $(MAKE) -C "$(LINUX_DIR)" \
49 CROSS_COMPILE="$(TARGET_CROSS)" \
50 ARCH="$(LINUX_KARCH)" \
51 SUBDIRS="$(PKG_BUILD_DIR)" \
52 EXTRA_CFLAGS="-DDEBUG -I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(PKG_BUILD_DIR)/include" \
53 modules
54 mv $(PKG_BUILD_DIR)/wlcompat.o $(PKG_BUILD_DIR)/wlcompat-debug.o
55 $(MAKE) -C "$(LINUX_DIR)" \
56 CROSS_COMPILE="$(TARGET_CROSS)" \
57 ARCH="$(LINUX_KARCH)" \
58 SUBDIRS="$(PKG_BUILD_DIR)" \
59 EXTRA_CFLAGS="-I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(PKG_BUILD_DIR)/include" \
60 modules
61 endef
62
63 define Package/kmod-wlcompat/install
64 $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
65 $(CP) $(PKG_BUILD_DIR)/wlcompat.o $(1)/lib/modules/$(LINUX_VERSION)/
66 $(INSTALL_DIR) $(1)/etc/modules.d
67 echo "wlcompat" > $(1)/etc/modules.d/30-wlcompat
68 endef
69
70 define Package/kmod-wlcompat-debug/install
71 $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
72 $(CP) $(PKG_BUILD_DIR)/wlcompat-debug.o $(1)/lib/modules/$(LINUX_VERSION)/
73 endef
74
75 $(eval $(call BuildPackage,kmod-wlcompat))
76 $(eval $(call BuildPackage,kmod-wlcompat-debug))
This page took 0.048904 seconds and 5 git commands to generate.