2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
13 PKG_VERSION
:=git-200706018
15 include $(INCLUDE_DIR
)/package.mk
17 define Package
/rt2x00
/Default
18 SUBMENU
:=Wireless Drivers
19 TITLE
:=Ralink GPL Drivers
20 DESCRIPTION
:=Ralink GPL Drivers for rt2x00 cards
21 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(LINUX_RELEASE
)
24 define KernelPackage
/rt2x00-lib
25 $(call Package
/rt2x00
/Default
)
26 DEPENDS
:=+kmod-mac80211
29 FILES
:=$(PKG_BUILD_DIR
)/rt2x00lib.
$(LINUX_KMOD_SUFFIX
)
30 AUTOLOAD
:=$(call AutoLoad
,25,rt2x00lib
)
33 define KernelPackage
/rt2x00-pci
34 $(call Package
/rt2x00
/Default
)
35 DEPENDS
:=@PCI_SUPPORT
+kmod-rt2x00-lib
38 FILES
:=$(PKG_BUILD_DIR
)/rt2x00pci.
$(LINUX_KMOD_SUFFIX
)
39 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00pci
)
42 define KernelPackage
/rt2x00-usb
43 $(call Package
/rt2x00
/Default
)
44 DEPENDS
:=@USB_SUPPORT
+kmod-rt2x00-lib
47 FILES
:=$(PKG_BUILD_DIR
)/rt2x00usb.
$(LINUX_KMOD_SUFFIX
)
48 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00usb
)
51 define KernelPackage
/rt2400-pci
52 $(call Package
/rt2x00
/Default
)
53 DEPENDS
:=+kmod-rt2x00-pci
55 DESCRIPTION
+= (RT2400 PCI
)
56 FILES
:=$(PKG_BUILD_DIR
)/rt2400pci.
$(LINUX_KMOD_SUFFIX
)
57 AUTOLOAD
:=$(call AutoLoad
,27,rt2400pci
)
60 define KernelPackage
/rt2500-pci
61 $(call Package
/rt2x00
/Default
)
62 DEPENDS
:=+kmod-rt2x00-pci
64 DESCRIPTION
+= (RT2500 PCI
)
65 FILES
:=$(PKG_BUILD_DIR
)/rt2500pci.
$(LINUX_KMOD_SUFFIX
)
66 AUTOLOAD
:=$(call AutoLoad
,27,rt2500pci
)
69 define KernelPackage
/rt2500-usb
70 $(call Package
/rt2x00
/Default
)
71 DEPENDS
:=+kmod-rt2x00-usb
73 DESCRIPTION
+= (RT2500 USB
)
74 FILES
:=$(PKG_BUILD_DIR
)/rt2500usb.
$(LINUX_KMOD_SUFFIX
)
75 AUTOLOAD
:=$(call AutoLoad
,27,rt2500usb
)
78 define KernelPackage
/rt61-pci
79 $(call Package
/rt2x00
/Default
)
80 DEPENDS
:=+kmod-rt2x00-pci
82 DESCRIPTION
+= (RT2x61 PCI
)
83 FILES
:=$(PKG_BUILD_DIR
)/rt61pci.
$(LINUX_KMOD_SUFFIX
)
84 AUTOLOAD
:=$(call AutoLoad
,27,rt61pci
)
87 define KernelPackage
/rt73-usb
88 $(call Package
/rt2x00
/Default
)
89 DEPENDS
:=+kmod-rt2x00-usb
91 DESCRIPTION
+= (RT73 USB
)
92 FILES
:=$(PKG_BUILD_DIR
)/rt73usb.
$(LINUX_KMOD_SUFFIX
)
93 AUTOLOAD
:=$(call AutoLoad
,27,rt73usb
)
97 $(call Build
/Prepare
/Default
)
98 $(CP
) -r src
/* $(PKG_BUILD_DIR
)/
99 sed
's/\$$$$(CONFIG_RT.*)/m\t\t/g' src
/Makefile
> $(PKG_BUILD_DIR
)/Makefile
103 $(MAKE
) -C
"$(LINUX_DIR)" \
104 CROSS_COMPILE
="$(TARGET_CROSS)" \
105 ARCH
="$(LINUX_KARCH)" \
106 SUBDIRS
="$(PKG_BUILD_DIR)" \
107 KERNELVERSION
="$(KERNEL)" \
108 KERNEL_SOURCE
="$(LINUX_DIR)" \
109 EXTRA_CFLAGS
="$(BUILDFLAGS) -include $(PKG_BUILD_DIR)/rt2x00_compat.h" \
113 $(eval
$(call KernelPackage
,rt2x00-lib
))
114 $(eval
$(call KernelPackage
,rt2x00-pci
))
115 $(eval
$(call KernelPackage
,rt2x00-usb
))
116 $(eval
$(call KernelPackage
,rt2400-pci
))
117 $(eval
$(call KernelPackage
,rt2500-pci
))
118 $(eval
$(call KernelPackage
,rt2500-usb
))
119 $(eval
$(call KernelPackage
,rt61-pci
))
120 $(eval
$(call KernelPackage
,rt73-usb
))