enable kmod build when target arch != mipsel
[openwrt.git] / target / linux / package / madwifi / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include ../../rules.mk
5
6 PKG_NAME:=madwifi
7 PKG_VERSION:=2005-08-13
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=188127127aebd8815595c025a787d729
10
11 PKG_SOURCE_URL:=http://madwifi.otaku42.de/2005/08/
12 PKG_SOURCE:=$(PKG_NAME)-cvs-snapshot-$(PKG_VERSION).tar.bz2
13 PKG_CAT:=bzcat
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
16
17 ifeq ($(KERNEL_DIR),)
18 KERNEL_DIR:=$(LINUX_DIR)
19 endif
20
21 ifeq ($(ARCH),mips)
22 HAL_TARGET:=mips-be-elf
23 endif
24 ifeq ($(ARCH),mipsel)
25 HAL_TARGET:=mips-le-elf
26 endif
27 ifeq ($(ARCH),i386)
28 HAL_TARGET:=i386-elf
29 endif
30
31 include $(TOPDIR)/package/rules.mk
32
33 $(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)$(BOARD)+$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(KERNEL_RELEASE))))
34
35 $(PKG_BUILD_DIR)/.configured:
36 touch $@
37
38 $(PKG_BUILD_DIR)/.built:
39 $(MAKE) -C $(PKG_BUILD_DIR) \
40 ARCH="$(LINUX_KARCH)" \
41 TARGET="$(HAL_TARGET)" \
42 TOOLPREFIX="$(KERNEL_CROSS)" \
43 KERNELPATH="$(KERNEL_DIR)"
44 touch $@
45
46 $(IPKG_KMOD_MADWIFI):
47 mkdir -p $(IDIR_KMOD_MADWIFI)/etc/modules.d
48 mkdir -p $(IDIR_KMOD_MADWIFI)/etc/init.d
49 mkdir -p $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)
50 install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI)/etc/modules.d/20-madwifi
51 install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI)/etc/init.d/S20madwifi
52 cp -fpR $(PKG_BUILD_DIR)/net80211/wlan*.o \
53 $(PKG_BUILD_DIR)/ath_hal/ath_hal.o \
54 $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.o \
55 $(PKG_BUILD_DIR)/ath/ath_pci.o \
56 $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)/
57 $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI) $(PACKAGE_DIR)
58
59 $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built
60 mkdir -p $(STAGING_DIR)/usr/include/madwifi
61 cp -fpR $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/
62 mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211
63 cp -fpR $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/
64 touch $@
65
66 install-dev: $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h
67
68 uninstall-dev:
69 rm -rf $(STAGING_DIR)/usr/include/madwifi
70
71 compile: install-dev
72 clean: uninstall-dev
This page took 0.042216 seconds and 5 git commands to generate.