drivers.mak revision 8d520ff1dc2da35cdca849e982051b86468016d8
1##### CLEAR VARS
2
3DRV_CFLAGS =
4DRV_WPA_CFLAGS =
5DRV_AP_CFLAGS =
6DRV_OBJS =
7DRV_WPA_OBJS =
8DRV_AP_OBJS =
9DRV_LIBS =
10DRV_WPA_LIBS =
11DRV_AP_LIBS =
12
13##### COMMON DRIVERS
14
15ifdef CONFIG_DRIVER_HOSTAP
16DRV_CFLAGS += -DCONFIG_DRIVER_HOSTAP
17DRV_OBJS += ../src/drivers/driver_hostap.o
18CONFIG_WIRELESS_EXTENSION=y
19NEED_AP_MLME=y
20NEED_NETLINK=y
21NEED_LINUX_IOCTL=y
22endif
23
24ifdef CONFIG_DRIVER_WIRED
25DRV_CFLAGS += -DCONFIG_DRIVER_WIRED
26DRV_OBJS += ../src/drivers/driver_wired.o
27endif
28
29ifdef CONFIG_DRIVER_MADWIFI
30DRV_CFLAGS += -DCONFIG_DRIVER_MADWIFI
31DRV_OBJS += ../src/drivers/driver_madwifi.o
32CONFIG_WIRELESS_EXTENSION=y
33CONFIG_L2_PACKET=linux
34NEED_NETLINK=y
35NEED_LINUX_IOCTL=y
36endif
37
38ifdef CONFIG_DRIVER_NL80211
39DRV_CFLAGS += -DCONFIG_DRIVER_NL80211
40DRV_OBJS += ../src/drivers/driver_nl80211.o
41DRV_OBJS += ../src/utils/radiotap.o
42NEED_SME=y
43NEED_AP_MLME=y
44NEED_NETLINK=y
45NEED_LINUX_IOCTL=y
46NEED_RFKILL=y
47ifdef CONFIG_LIBNL_TINY
48DRV_LIBS += -lnl-tiny
49else
50DRV_LIBS += -lnl
51endif
52
53ifdef CONFIG_LIBNL20
54DRV_LIBS += -lnl-genl
55DRV_CFLAGS += -DCONFIG_LIBNL20
56endif
57endif
58
59ifdef CONFIG_DRIVER_BSD
60ifndef CONFIG_L2_PACKET
61CONFIG_L2_PACKET=freebsd
62endif
63DRV_CFLAGS += -DCONFIG_DRIVER_BSD
64DRV_OBJS += ../src/drivers/driver_bsd.o
65CONFIG_L2_FREEBSD=y
66CONFIG_DNET_PCAP=y
67endif
68
69ifdef CONFIG_DRIVER_TEST
70DRV_CFLAGS += -DCONFIG_DRIVER_TEST
71DRV_OBJS += ../src/drivers/driver_test.o
72NEED_AP_MLME=y
73endif
74
75ifdef CONFIG_DRIVER_NONE
76DRV_CFLAGS += -DCONFIG_DRIVER_NONE
77DRV_OBJS += ../src/drivers/driver_none.o
78endif
79
80##### PURE AP DRIVERS
81
82ifdef CONFIG_DRIVER_ATHEROS
83DRV_AP_CFLAGS += -DCONFIG_DRIVER_ATHEROS
84DRV_AP_OBJS += ../src/drivers/driver_atheros.o
85CONFIG_L2_PACKET=linux
86NEED_NETLINK=y
87NEED_LINUX_IOCTL=y
88endif
89
90##### PURE CLIENT DRIVERS
91
92ifdef CONFIG_DRIVER_WEXT
93DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
94CONFIG_WIRELESS_EXTENSION=y
95NEED_NETLINK=y
96NEED_LINUX_IOCTL=y
97NEED_RFKILL=y
98endif
99
100ifdef CONFIG_DRIVER_RALINK
101DRV_WPA_CFLAGS += -DCONFIG_DRIVER_RALINK
102DRV_WPA_OBJS += ../src/drivers/driver_ralink.o
103NEED_NETLINK=y
104NEED_LINUX_IOCTL=y
105endif
106
107ifdef CONFIG_DRIVER_BROADCOM
108DRV_WPA_CFLAGS += -DCONFIG_DRIVER_BROADCOM
109DRV_WPA_OBJS += ../src/drivers/driver_broadcom.o
110endif
111
112ifdef CONFIG_DRIVER_NDIS
113DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS
114DRV_WPA_OBJS += ../src/drivers/driver_ndis.o
115ifdef CONFIG_NDIS_EVENTS_INTEGRATED
116DRV_WPA_OBJS += ../src/drivers/driver_ndis_.o
117endif
118ifndef CONFIG_L2_PACKET
119CONFIG_L2_PACKET=pcap
120endif
121CONFIG_WINPCAP=y
122ifdef CONFIG_USE_NDISUIO
123DRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO
124endif
125endif
126
127ifdef CONFIG_DRIVER_OSX
128DRV_WPA_CFLAGS += -DCONFIG_DRIVER_OSX
129DRV_WPA_OBJS += ../src/drivers/driver_osx.o
130DRV_WPA_LDFLAGS += -framework CoreFoundation
131DRV_WPA_LDFLAGS += -F/System/Library/PrivateFrameworks -framework Apple80211
132endif
133
134ifdef CONFIG_DRIVER_IPHONE
135DRV_WPA_CFLAGS += -DCONFIG_DRIVER_IPHONE
136DRV_WPA_OBJS += ../src/drivers/driver_iphone.o
137DRV_WPA_OBJS += ../src/drivers/MobileApple80211.o
138DRV_WPA_LDFLAGS += -framework CoreFoundation
139endif
140
141ifdef CONFIG_DRIVER_ROBOSWITCH
142DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH
143DRV_WPA_OBJS += ../src/drivers/driver_roboswitch.o
144endif
145
146ifdef CONFIG_WIRELESS_EXTENSION
147DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
148DRV_WPA_OBJS += ../src/drivers/driver_wext.o
149NEED_RFKILL=y
150endif
151
152ifdef NEED_NETLINK
153DRV_OBJS += ../src/drivers/netlink.o
154endif
155
156ifdef NEED_LINUX_IOCTL
157DRV_OBJS += ../src/drivers/linux_ioctl.o
158endif
159
160ifdef NEED_RFKILL
161DRV_OBJS += ../src/drivers/rfkill.o
162endif
163
164
165##### COMMON VARS
166DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS)
167DRV_WPA_CFLAGS += $(DRV_CFLAGS)
168DRV_AP_CFLAGS += $(DRV_CFLAGS)
169
170DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS)
171DRV_WPA_LIBS += $(DRV_LIBS)
172DRV_AP_LIBS += $(DRV_LIBS)
173
174DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS)
175DRV_WPA_OBJS += $(DRV_OBJS)
176DRV_AP_OBJS += $(DRV_OBJS)
177
178DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS)
179DRV_WPA_LDFLAGS += $(DRV_LDFLAGS)
180DRV_AP_LDFLAGS += $(DRV_LDFLAGS)
181