upgrade madwifi to r1416-20060126, unite madwifi-tools and kmod-madwifi (madwifi...
[openwrt.git] / openwrt / target / linux / package / madwifi / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include ../../rules.mk
5
6 PKG_NAME:=madwifi-ng
7 PKG_VERSION:=r1416-20060126
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=f308a0dbbb5d5497c0e09d86e8bde32c
10
11 PKG_SOURCE_URL:=http://snapshots.madwifi.org/$(PKG_NAME)
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_CAT:=zcat
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16
17 ifeq ($(ARCH),mips)
18 HAL_TARGET:=mips-be-elf
19 endif
20 ifeq ($(ARCH),mipsel)
21 HAL_TARGET:=mips-le-elf
22 endif
23 ifeq ($(ARCH),i386)
24 HAL_TARGET:=i386-elf
25 endif
26
27 ifneq ($(BR2_LINUX_2_4_AR531X),)
28 BUS := AHB
29 bus := ahb
30 else
31 BUS := PCI
32 bus := pci
33 endif
34
35 include $(TOPDIR)/package/rules.mk
36
37 $(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
38
39 $(PKG_BUILD_DIR)/.configured:
40 touch $@
41
42 $(PKG_BUILD_DIR)/.built:
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 PATH="$(TARGET_PATH)" \
45 ARCH="$(LINUX_KARCH)" \
46 CROSS_COMPILE="$(TARGET_CROSS)" \
47 TARGET="$(HAL_TARGET)" \
48 TOOLPREFIX="$(KERNEL_CROSS)" \
49 TOOLPATH="$(KERNEL_CROSS)" \
50 KERNELPATH="$(LINUX_DIR)" \
51 BUS="$(BUS)" \
52 DOMULTI=1 all
53 $(RSTRIP) $(PKG_BUILD_DIR)/tools/madwifi_multi
54 touch $@
55
56 $(IPKG_KMOD_MADWIFI):
57 mkdir -p $(IDIR_KMOD_MADWIFI)/etc/modules.d
58 mkdir -p $(IDIR_KMOD_MADWIFI)/etc/init.d
59 mkdir -p $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)
60 mkdir -p $(IDIR_KMOD_MADWIFI)/usr/sbin
61 install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI)/etc/modules.d/20-madwifi
62 install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI)/etc/init.d/S20madwifi
63 cp -fpR $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \
64 $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \
65 $(PKG_BUILD_DIR)/ath/ath_$(bus).$(LINUX_KMOD_SUFFIX) \
66 $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \
67 $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \
68 $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)/
69 cp -fpR $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(IDIR_KMOD_MADWIFI)/usr/sbin/
70 $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI) $(PACKAGE_DIR)
71
72 $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built
73 mkdir -p $(STAGING_DIR)/usr/include/madwifi
74 cp -fpR $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/
75 mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211
76 cp -fpR $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/
77 touch $@
78
79 install-dev: $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h
80
81 uninstall-dev:
82 rm -rf $(STAGING_DIR)/usr/include/madwifi
83
84 compile-targets: install-dev
85 clean-targets: uninstall-dev
This page took 0.046436 seconds and 5 git commands to generate.