map xt_ to ipt_ for iptables modules
[openwrt.git] / openwrt / target / linux / package / madwifi-old / Makefile
1 # $Id: Makefile 3287 2006-02-28 20:09:56Z nbd $
2
3 include $(TOPDIR)/rules.mk
4 include ../../rules.mk
5
6 PKG_NAME:=madwifi-old
7 PKG_VERSION:=r1417-20060128
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=95d457e0edfb7028e09dee60db7fa7b8
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 BUS := PCI
28
29 ifneq ($(BR2_LINUX_2_4_AR531X),)
30 BUS := AHB
31 endif
32 # ifneq ($(BR2_LINUX_2_6_ARUBA),)
33 # BUS := PCI AHB # no suitable HAL for AHB yet.
34 # endif
35
36 BUS_MODULES:=
37 ifeq ($(findstring AHB,$(BUS)),AHB)
38 BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX)
39 endif
40 ifeq ($(findstring PCI,$(BUS)),PCI)
41 BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX)
42 endif
43
44
45 include $(TOPDIR)/package/rules.mk
46
47 $(eval $(call PKG_template,KMOD_MADWIFI_OLD,kmod-madwifi-old,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
48
49 $(PKG_BUILD_DIR)/.configured:
50 touch $@
51
52 MADWIFI_OLD_MAKEOPTS= -C $(PKG_BUILD_DIR) \
53 PATH="$(TARGET_PATH)" \
54 ARCH="$(LINUX_KARCH)" \
55 CROSS_COMPILE="$(TARGET_CROSS)" \
56 TARGET="$(HAL_TARGET)" \
57 TOOLPREFIX="$(KERNEL_CROSS)" \
58 TOOLPATH="$(KERNEL_CROSS)" \
59 KERNELPATH="$(LINUX_DIR)" \
60 DOMULTI=1
61
62
63 $(PKG_BUILD_DIR)/.built:
64 ifeq ($(findstring AHB,$(BUS)),AHB)
65 $(MAKE) $(MADWIFI_OLD_MAKEOPTS) BUS="AHB" all
66 endif
67 ifeq ($(findstring PCI,$(BUS)),PCI)
68 $(MAKE) $(MADWIFI_OLD_MAKEOPTS) BUS="PCI" all
69 endif
70 $(MAKE) $(MADWIFI_OLD_MAKEOPTS) -C tools all
71 $(RSTRIP) $(PKG_BUILD_DIR)/tools/madwifi_multi
72 touch $@
73
74 $(IPKG_KMOD_MADWIFI_OLD):
75 install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/etc/modules.d
76 install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI_OLD)/etc/modules.d/20-madwifi
77 install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/etc/init.d
78 install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI_OLD)/etc/init.d/S20madwifi
79 install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/lib/modules/$(LINUX_VERSION)
80 $(CP) $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \
81 $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \
82 $(BUS_MODULES) \
83 $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \
84 $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \
85 $(IDIR_KMOD_MADWIFI_OLD)/lib/modules/$(LINUX_VERSION)/
86 install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/usr/sbin
87 $(CP) $(PKG_BUILD_DIR)/tools/{80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats} $(IDIR_KMOD_MADWIFI_OLD)/usr/sbin/
88 $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI_OLD) $(PACKAGE_DIR)
89
90 $(STAGING_DIR)/usr/include/madwifi-old/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built
91 mkdir -p $(STAGING_DIR)/usr/include/madwifi-old
92 $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi-old
93 mkdir -p $(STAGING_DIR)/usr/include/madwifi-old/net80211
94 $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi-old/net80211/
95 touch $@
96
97 install-dev: $(STAGING_DIR)/usr/include/madwifi-old/net80211/ieee80211.h
98
99 uninstall-dev:
100 rm -rf $(STAGING_DIR)/usr/include/madwifi-old
101
102 compile-targets: install-dev
103 clean-targets: uninstall-dev
This page took 0.04302 seconds and 5 git commands to generate.