x86/PCI: use host bridge _CRS info on ASUS M2V-MX SE
[linux-btrfs-devel.git] / drivers / staging / rtl8192u / ieee80211 / Makefile
blob0775c5599d69858bfdc7ddf6913106cee70de6f8
1 NIC_SELECT = RTL8192U
3 KVER := $(shell uname -r)
4 MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/$(NIC_SELECT)
6 CC = gcc
7 ifneq ($(shell uname -r|cut -d. -f1,2), 2.4)
8 ccflags-y := -I$(TOPDIR)/drivers/net/wireless
9 ccflags-y += -O2
10 ccflags-y += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX
12 #it will fail to compile in suse linux enterprise 10 sp2. This flag is to solve this problem.
13 ifeq ($(shell uname -r | cut -d. -f1,2,3,4), 2.6.16.60-0)
14 ccflags-y := -DOPENSUSE_SLED
15 endif
17 ifeq ($(NIC_SELECT),RTL8192U)
18 #ccflags-y := -DUSB_TX_DRIVER_AGGREGATION_ENABLE
19 #ccflags-y := -DUSB_RX_AGGREGATION_SUPPORT
20 endif
21 #ccflags-y := -DJOHN_NOCPY
22 #flags to enable or disble 80211D feature
23 ieee80211-rsl-objs := ieee80211_rx.o \
24 ieee80211_softmac.o \
25 ieee80211_tx.o \
26 ieee80211_wx.o \
27 ieee80211_module.o \
28 ieee80211_softmac_wx.o\
29 rtl819x_HTProc.o\
30 rtl819x_TSProc.o\
31 rtl819x_BAProc.o\
32 dot11d.o
34 ieee80211_crypt-rsl-objs := ieee80211_crypt.o
35 ieee80211_crypt_tkip-rsl-objs := ieee80211_crypt_tkip.o
36 ieee80211_crypt_ccmp-rsl-objs := ieee80211_crypt_ccmp.o
37 ieee80211_crypt_wep-rsl-objs := ieee80211_crypt_wep.o
39 obj-m +=ieee80211-rsl.o
40 obj-m +=ieee80211_crypt-rsl.o
41 obj-m +=ieee80211_crypt_wep-rsl.o
42 obj-m +=ieee80211_crypt_tkip-rsl.o
43 obj-m +=ieee80211_crypt_ccmp-rsl.o
45 KSRC := /lib/modules/$(KVER)/build
46 INSTALL_PREFIX :=
48 all: modules
50 modules:
51 $(MAKE) -C $(KSRC) M=$(PWD) CC=$(CC) modules
53 install: modules
54 rm -fr $(MODDESTDIR)
55 mkdir -p $(MODDESTDIR)
56 @install -p -m 644 ieee80211_crypt-rsl.ko $(MODDESTDIR)
57 @install -p -m 644 ieee80211_crypt_wep-rsl.ko $(MODDESTDIR)
58 @install -p -m 644 ieee80211_crypt_tkip-rsl.ko $(MODDESTDIR)
59 @install -p -m 644 ieee80211_crypt_ccmp-rsl.ko $(MODDESTDIR)
60 @install -p -m 644 ieee80211-rsl.ko $(MODDESTDIR)
61 depmod -a
62 uninstall:
63 rm -fr $(MODDESTDIR)
64 depmod -a
66 else
67 LD := ld
68 KSRC := /lib/modules/$(KVER)/build
69 CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
71 CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall
72 CFLAGS += -I$(KSRC)/include -I.
73 #Kernel 2.4.31
74 CFLAGS += -DMODVERSIONS -DEXPORT_SYMTAB -include $(KSRC)/include/linux/modversions.h
75 #Kernel 2.4.20
76 #CFLAGS += -D__NO_VERSION__ -DEXPORT_SYMTAB
77 SMP := $(shell $(CC) $(MODCFLAGS) -E -dM $(CONFIG_FILE) | \
78 grep CONFIG_SMP | awk '{print $$3}')
79 ifneq ($(SMP),1)
80 SMP := 0
81 endif
82 ifeq ($(SMP),1)
83 CFLAGS += -D__SMP__
84 endif
86 #CFLAGS += -DJOHN_NOCPY
88 OBJS := ${patsubst %.c, %.o, ${wildcard *.c}}
89 all:${OBJS} ieee80211_crypt-rsl.o michael_mic-rsl.o aes-rsl.o ieee80211_crypt_wep-rsl.o ieee80211_crypt_tkip-rsl.o ieee80211_crypt_ccmp-rsl.o crypto-rsl.o ieee80211-rsl.o
91 ieee80211_crypt-rsl.o: ieee80211_crypt.o
92 mv $^ $@
94 michael_mic-rsl.o: michael_mic.o
95 mv $^ $@
97 aes-rsl.o: aes.o
98 mv $^ $@
100 ieee80211_crypt_wep-rsl.o: ieee80211_crypt_wep.o
101 mv $^ $@
103 ieee80211_crypt_tkip-rsl.o: ieee80211_crypt_tkip.o
104 mv $^ $@
106 ieee80211_crypt_ccmp-rsl.o: ieee80211_crypt_ccmp.o
107 mv $^ $@
109 crypto-rsl.o: arc4.o api.o autoload.o cipher.o compress.o digest.o scatterwalk.o proc.o
110 $(LD) -r $^ -o $@
112 ieee80211-rsl.o: ieee80211_rx.o ieee80211_tx.o ieee80211_wx.o ieee80211_module.o ieee80211_softmac_wx.o ieee80211_softmac.o rtl819x_HTProc.o rtl819x_TSProc.o rtl819x_BAProc.o dot11d.o
113 $(LD) -r $^ -o $@
114 install:
115 rm -fr $(MODDESTDIR)
116 mkdir -p $(MODDESTDIR)
117 @install -p -m 644 ieee80211_crypt-rsl.o $(MODDESTDIR)
118 @install -p -m 644 crypto-rsl.o $(MODDESTDIR)
119 @install -p -m 644 michael_mic-rsl.o $(MODDESTDIR)
120 @install -p -m 644 aes-rsl.o $(MODDESTDIR)
121 @install -p -m 644 ieee80211_crypt_wep-rsl.o $(MODDESTDIR)
122 @install -p -m 644 ieee80211_crypt_tkip-rsl.o $(MODDESTDIR)
123 @install -p -m 644 ieee80211_crypt_ccmp-rsl.o $(MODDESTDIR)
124 @install -p -m 644 ieee80211-rsl.o $(MODDESTDIR)
125 /sbin/depmod -a ${shell uname -r}
127 uninstall:
128 rm -fr $(MODDESTDIR)
129 /sbin/depmod -a ${shell uname -r}
131 endif
133 .PHONY: clean
134 clean:
135 rm -fr *.mod.c *.mod *.o .*.cmd *.mod.* *.ko *.o *~
136 rm -rf .tmp_versions
137 rm -rf Module.symvers