3 KVER
:= $(shell uname
-r
)
4 MODDESTDIR
:= /lib
/modules
/$(KVER
)/kernel
/drivers
/net
/wireless
/$(NIC_SELECT
)
7 ifneq ($(shell uname
-r|cut
-d.
-f1
,2), 2.4)
8 ccflags-y
:= -I
$(TOPDIR
)/drivers
/net
/wireless
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
17 ifeq ($(NIC_SELECT
),RTL8192U
)
18 #ccflags-y := -DUSB_TX_DRIVER_AGGREGATION_ENABLE
19 #ccflags-y := -DUSB_RX_AGGREGATION_SUPPORT
21 #ccflags-y := -DJOHN_NOCPY
22 #flags to enable or disble 80211D feature
23 ieee80211-rsl-objs
:= ieee80211_rx.o \
28 ieee80211_softmac_wx.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
51 $(MAKE
) -C
$(KSRC
) M
=$(PWD
) CC
=$(CC
) modules
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
)
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.
74 CFLAGS
+= -DMODVERSIONS
-DEXPORT_SYMTAB
-include $(KSRC
)/include/linux
/modversions.h
76 #CFLAGS += -D__NO_VERSION__ -DEXPORT_SYMTAB
77 SMP
:= $(shell $(CC
) $(MODCFLAGS
) -E
-dM
$(CONFIG_FILE
) | \
78 grep CONFIG_SMP | awk
'{print $$3}')
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
94 michael_mic-rsl.o
: michael_mic.o
100 ieee80211_crypt_wep-rsl.o
: ieee80211_crypt_wep.o
103 ieee80211_crypt_tkip-rsl.o
: ieee80211_crypt_tkip.o
106 ieee80211_crypt_ccmp-rsl.o
: ieee80211_crypt_ccmp.o
109 crypto-rsl.o
: arc4.o api.o autoload.o cipher.o compress.o digest.o scatterwalk.o proc.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
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
}
129 /sbin
/depmod
-a
${shell uname
-r
}
135 rm -fr
*.mod.c
*.mod
*.o .
*.cmd
*.mod.
* *.ko
*.o
*~
137 rm -rf Module.symvers