829eed8f4fa35c674db54e51f614e5935b44a599
[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
7 PKG_VERSION:=2005-09-16
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=af6959c971ffa1b38ec171833834b845
10
11 PKG_SOURCE_URL:=http://madwifi.otaku42.de/2005/09/
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 ifeq ($(KERNEL),2.4)
32 MODUL_SUFFIX=o
33 else
34 MODUL_SUFFIX=ko
35 endif
36
37 include $(TOPDIR)/package/rules.mk
38
39 $(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)$(BOARD)+$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(KERNEL_RELEASE))))
40
41 $(PKG_BUILD_DIR)/.configured:
42 touch $@
43
44 $(PKG_BUILD_DIR)/.built:
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 PATH="$(TARGET_PATH)" \
47 ARCH="$(LINUX_KARCH)" \
48 TARGET="$(HAL_TARGET)" \
49 TOOLPREFIX="$(KERNEL_CROSS)" \
50 KERNELPATH="$(KERNEL_DIR)"
51 touch $@
52
53 $(IPKG_KMOD_MADWIFI):
54 mkdir -p $(IDIR_KMOD_MADWIFI)/etc/modules.d
55 mkdir -p $(IDIR_KMOD_MADWIFI)/etc/init.d
56 mkdir -p $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)
57 install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI)/etc/modules.d/20-madwifi
58 install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI)/etc/init.d/S20madwifi
59 cp -fpR $(PKG_BUILD_DIR)/net80211/wlan*.$(MODUL_SUFFIX) \
60 $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(MODUL_SUFFIX) \
61 $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(MODUL_SUFFIX) \
62 $(PKG_BUILD_DIR)/ath/ath_pci.$(MODUL_SUFFIX) \
63 $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)/
64 $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI) $(PACKAGE_DIR)
65
66 $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built
67 mkdir -p $(STAGING_DIR)/usr/include/madwifi
68 cp -fpR $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/
69 mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211
70 cp -fpR $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/
71 touch $@
72
73 install-dev: $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h
74
75 uninstall-dev:
76 rm -rf $(STAGING_DIR)/usr/include/madwifi
77
78 compile: install-dev
79 clean: uninstall-dev
This page took 0.038113 seconds and 3 git commands to generate.