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