x86-2.6 compile fixes for snapshot build
[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:=r1358-20051215
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=0ef00a095359e5af313f52446ebfbbf1
10
11 PKG_SOURCE_URL:=http://snapshots.madwifi.org/madwifi-ng
12 PKG_SOURCE:=$(PKG_NAME)-ng-$(PKG_VERSION).tar.gz
13 PKG_CAT:=zcat
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-ng-$(PKG_VERSION)
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 ifneq ($(BR2_LINUX_2_4_AR531X),)
32 BUS := AHB
33 bus := ahb
34 else
35 BUS := PCI
36 bus := pci
37 endif
38
39 include $(TOPDIR)/package/rules.mk
40
41 $(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(KERNEL_RELEASE))))
42
43 $(PKG_BUILD_DIR)/.configured:
44 touch $@
45
46 $(PKG_BUILD_DIR)/.built:
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 PATH="$(TARGET_PATH)" \
49 ARCH="$(LINUX_KARCH)" \
50 CROSS_COMPILE="$(TARGET_CROSS)" \
51 TARGET="$(HAL_TARGET)" \
52 TOOLPREFIX="$(KERNEL_CROSS)" \
53 TOOLPATH="$(KERNEL_CROSS)" \
54 KERNELPATH="$(KERNEL_DIR)" \
55 BUS="$(BUS)" \
56 all
57 touch $@
58
59 $(IPKG_KMOD_MADWIFI):
60 mkdir -p $(IDIR_KMOD_MADWIFI)/etc/modules.d
61 mkdir -p $(IDIR_KMOD_MADWIFI)/etc/init.d
62 mkdir -p $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)
63 install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI)/etc/modules.d/20-madwifi
64 install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI)/etc/init.d/S20madwifi
65 cp -fpR $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \
66 $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \
67 $(PKG_BUILD_DIR)/ath/ath_$(bus).$(LINUX_KMOD_SUFFIX) \
68 $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \
69 $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \
70 $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)/
71 $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI) $(PACKAGE_DIR)
72
73 $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built
74 mkdir -p $(STAGING_DIR)/usr/include/madwifi
75 cp -fpR $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/
76 mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211
77 cp -fpR $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/
78 touch $@
79
80 install-dev: $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h
81
82 uninstall-dev:
83 rm -rf $(STAGING_DIR)/usr/include/madwifi
84
85 compile-targets: install-dev
86 clean-targets: uninstall-dev
This page took 0.043583 seconds and 5 git commands to generate.