set PATH in rules.mk
[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:=3
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/kmod-wlcompat
20 SECTION:=drivers
21 CATEGORY:=Drivers
22 DEPENDS:=kmod-brcm-wl
23 DEFAULT:=y
24 TITLE:=Wrapper providing Wireless Extensions for Broadcom wl module
25 DESCRIPTION:= \\\
26 A wrapper module, that provides Wireless Extension support for the \\\
27 proprietary Broadcom wl module.
28 VERSION:=$(LINUX_VERSION)+$(BOARD)-$(PKG_RELEASE)
29 endef
30
31 define Package/kmod-wlcompat-debug
32 $(call Package/kmod-wlcompat)
33 DEFAULT:=m
34 TITLE:=Wrapper providing Wireless Extensions for Broadcom wl module (debug)
35 DESCRIPTION:= \\\
36 A wrapper module, that provides Wireless Extension support for the \\\
37 proprietary Broadcom wl module.
38 endef
39
40 define Build/Prepare
41 mkdir -p $(PKG_BUILD_DIR)
42 $(CP) ./src/* $(PKG_BUILD_DIR)/
43 endef
44
45 define Build/Compile
46 $(MAKE) -C "$(LINUX_DIR)" \
47 CROSS_COMPILE="$(TARGET_CROSS)" \
48 ARCH="$(LINUX_KARCH)" \
49 SUBDIRS="$(PKG_BUILD_DIR)" \
50 EXTRA_CFLAGS="-DDEBUG -I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(PKG_BUILD_DIR)/include" \
51 modules
52 mv $(PKG_BUILD_DIR)/wlcompat.o $(PKG_BUILD_DIR)/wlcompat-debug.o
53 $(MAKE) -C "$(LINUX_DIR)" \
54 CROSS_COMPILE="$(TARGET_CROSS)" \
55 ARCH="$(LINUX_KARCH)" \
56 SUBDIRS="$(PKG_BUILD_DIR)" \
57 EXTRA_CFLAGS="-I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(PKG_BUILD_DIR)/include" \
58 modules
59 endef
60
61 define Package/kmod-wlcompat/install
62 install -d -m0755 $(1)/etc/modules.d
63 echo "wlcompat" > $(1)/etc/modules.d/30-wlcompat
64 install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
65 $(CP) $(PKG_BUILD_DIR)/wlcompat.o $(1)/lib/modules/$(LINUX_VERSION)/
66 endef
67
68 define Package/kmod-wlcompat-debug/install
69 install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
70 $(CP) $(PKG_BUILD_DIR)/wlcompat-debug.o $(1)/lib/modules/$(LINUX_VERSION)/
71 endef
72
73 $(eval $(call BuildPackage,kmod-wlcompat))
74 $(eval $(call BuildPackage,kmod-wlcompat-debug))
This page took 0.059366 seconds and 5 git commands to generate.