disable ath9k on all platforms without pci support, not just uml
[openwrt-10.03/.git] / package / ath9k / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/kernel.mk
9
10 PKG_NAME:=ath9k
11 PKG_VERSION:=20080803
12 PKG_RELEASE:=1
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define KernelPackage/ath9k
17   SUBMENU:=Wireless Drivers
18   TITLE:=Atheros AR9xxx and AR5416/AR5418 wireless support
19   DEPENDS:=+kmod-mac80211 @!TARGET_brcm47xx @PCI_SUPPORT
20   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath9k/ath9k.$(LINUX_KMOD_SUFFIX)
21   AUTOLOAD:=$(call AutoLoad,30,ath9k)
22 endef
23
24 define KernelPackage/ath9k/description
25 Kernel module for Atheros AR9xxx and AR5416/AR5418 based cards
26 endef
27
28 EXTRA_KCONFIG:= \
29         CONFIG_ATH9K=m
30
31 EXTRA_CFLAGS:= \
32         $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
33         $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
34
35 MAKE_OPTS:= \
36         ARCH="$(LINUX_KARCH)" \
37         CROSS_COMPILE="$(TARGET_CROSS)" \
38         SUBDIRS="$(PKG_BUILD_DIR)/drivers/net/wireless/ath9k" \
39         EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
40         LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/mac80211 -I$(LINUX_DIR)/include -include linux/autoconf.h" \
41         $(EXTRA_KCONFIG)
42
43 define Build/Prepare
44         mkdir -p $(PKG_BUILD_DIR)
45         $(CP) ./src/* $(PKG_BUILD_DIR)/
46         $(Build/Patch)
47         $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
48 endef
49
50 define Build/Configure
51 endef
52
53 define Build/Compile
54         $(MAKE) -C "$(LINUX_DIR)" \
55                 $(MAKE_OPTS) \
56                 modules
57 endef
58
59 $(eval $(call KernelPackage,ath9k))