move wlcompat from target/linux/package/ to package/.
[openwrt/staging/mkresin.git] / openwrt / package / wlcompat / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=kmod-wlcompat
6 PKG_RELEASE:=3
7
8 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
9
10 include $(TOPDIR)/package/rules.mk
11
12 WLCOMPAT_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
13 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \
14 -Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -funsigned-char -nostdinc \
15 -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(STAGING_DIR)/usr/include -I./src/include
16
17 define Package/kmod-wlcompat
18 SECTION:=drivers
19 CATEGORY:=Drivers
20 DEPENDS:=
21 TITLE:=Wrapper providing Wireless Extensions for Broadcom wl module
22 DESCRIPTION:= \\\
23 A wrapper module, that provides Wireless Extension support for the \\\
24 proprietary Broadcom wl module.
25 VERSION:=$(LINUX_VERSION)+$(BOARD)-$(PKG_RELEASE)
26 endef
27
28 define Package/kmod-wlcompat-debug
29 $(call Package/kmod-wlcompat)
30 TITLE:=Wrapper providing Wireless Extensions for Broadcom wl module (debug)
31 DESCRIPTION:= \\\
32 A wrapper module, that provides Wireless Extension support for the \\\
33 proprietary Broadcom wl module.
34 endef
35
36 define Build/Compile
37 $(TARGET_CC) -c -o $(PKG_BUILD_DIR)/wlcompat.o $(WLCOMPAT_FLAGS) wlcompat.c
38 $(TARGET_CC) -c -o $(PKG_BUILD_DIR)/wlcompat-debug.o $(WLCOMPAT_FLAGS) -DDEBUG wlcompat.c
39 endef
40
41 define Package/kmod-wlcompat/install
42 install -d -m0755 $(1)/etc/modules.d
43 echo "wlcompat" > $(1)/etc/modules.d/30-wlcompat
44 install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
45 $(CP) $(PKG_BUILD_DIR)/wlcompat.o $(1)/lib/modules/$(LINUX_VERSION)/
46 endef
47
48 define Package/kmod-wlcompat-debug/install
49 install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
50 $(CP) $(PKG_BUILD_DIR)/wlcompat-debug.o $(1)/lib/modules/$(LINUX_VERSION)/
51 endef
52
53 $(eval $(call BuildPackage,kmod-wlcompat))
54 $(eval $(call BuildPackage,kmod-wlcompat-debug))