• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_WIRED
16DRV_CFLAGS += -DCONFIG_DRIVER_WIRED
17DRV_OBJS += src/drivers/driver_wired.c
18NEED_DRV_WIRED_COMMON=1
19endif
20
21ifdef CONFIG_DRIVER_MACSEC_LINUX
22DRV_CFLAGS += -DCONFIG_DRIVER_MACSEC_LINUX
23DRV_OBJS += src/drivers/driver_macsec_linux.c
24NEED_DRV_WIRED_COMMON=1
25CONFIG_LIBNL3_ROUTE=y
26NEED_LIBNL=y
27endif
28
29ifdef NEED_DRV_WIRED_COMMON
30DRV_OBJS += src/drivers/driver_wired_common.c
31endif
32
33ifdef CONFIG_DRIVER_NL80211
34DRV_CFLAGS += -DCONFIG_DRIVER_NL80211
35DRV_OBJS += src/drivers/driver_nl80211.c
36DRV_OBJS += src/drivers/driver_nl80211_android.c
37DRV_OBJS += src/drivers/driver_nl80211_capa.c
38DRV_OBJS += src/drivers/driver_nl80211_event.c
39DRV_OBJS += src/drivers/driver_nl80211_monitor.c
40DRV_OBJS += src/drivers/driver_nl80211_scan.c
41ifdef CONFIG_DRIVER_NL80211_QCA
42DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_QCA
43endif
44NEED_SME=y
45NEED_AP_MLME=y
46NEED_NETLINK=y
47NEED_LINUX_IOCTL=y
48NEED_RFKILL=y
49NEED_RADIOTAP=y
50NEED_LIBNL=y
51endif
52
53ifdef CONFIG_DRIVER_BSD
54ifndef CONFIG_L2_PACKET
55CONFIG_L2_PACKET=freebsd
56endif
57DRV_CFLAGS += -DCONFIG_DRIVER_BSD
58DRV_OBJS += src/drivers/driver_bsd.c
59CONFIG_L2_FREEBSD=y
60CONFIG_DNET_PCAP=y
61endif
62
63ifdef CONFIG_DRIVER_OPENBSD
64ifndef CONFIG_L2_PACKET
65CONFIG_L2_PACKET=freebsd
66endif
67DRV_CFLAGS += -DCONFIG_DRIVER_OPENBSD
68DRV_OBJS += src/drivers/driver_openbsd.c
69endif
70
71ifdef CONFIG_DRIVER_NONE
72DRV_CFLAGS += -DCONFIG_DRIVER_NONE
73DRV_OBJS += src/drivers/driver_none.c
74endif
75
76ifdef CONFIG_DRIVER_HDF
77DRV_CFLAGS += -DCONFIG_DRIVER_HDF
78DRV_OBJS += src/drivers/wpa_hal.c
79DRV_OBJS += src/drivers/wpa_hal_event.c
80endif
81
82##### PURE AP DRIVERS
83
84ifdef CONFIG_DRIVER_HOSTAP
85DRV_AP_CFLAGS += -DCONFIG_DRIVER_HOSTAP
86DRV_AP_OBJS += src/drivers/driver_hostap.c
87CONFIG_WIRELESS_EXTENSION=y
88NEED_AP_MLME=y
89NEED_NETLINK=y
90NEED_LINUX_IOCTL=y
91endif
92
93ifdef CONFIG_DRIVER_ATHEROS
94DRV_AP_CFLAGS += -DCONFIG_DRIVER_ATHEROS
95DRV_AP_OBJS += src/drivers/driver_atheros.c
96CONFIG_L2_PACKET=linux
97NEED_NETLINK=y
98NEED_LINUX_IOCTL=y
99endif
100
101##### PURE CLIENT DRIVERS
102
103ifdef CONFIG_DRIVER_WEXT
104DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
105CONFIG_WIRELESS_EXTENSION=y
106NEED_NETLINK=y
107NEED_LINUX_IOCTL=y
108NEED_RFKILL=y
109endif
110
111ifdef CONFIG_DRIVER_NDIS
112DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS
113DRV_WPA_OBJS += src/drivers/driver_ndis.c
114ifdef CONFIG_NDIS_EVENTS_INTEGRATED
115DRV_WPA_OBJS += src/drivers/driver_ndis_.c
116endif
117ifndef CONFIG_L2_PACKET
118CONFIG_L2_PACKET=pcap
119endif
120CONFIG_WINPCAP=y
121ifdef CONFIG_USE_NDISUIO
122DRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO
123endif
124endif
125
126ifdef CONFIG_DRIVER_ROBOSWITCH
127DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH
128DRV_WPA_OBJS += src/drivers/driver_roboswitch.c
129endif
130
131ifdef CONFIG_WIRELESS_EXTENSION
132DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
133DRV_WPA_OBJS += src/drivers/driver_wext.c
134NEED_RFKILL=y
135endif
136
137ifdef NEED_NETLINK
138DRV_OBJS += src/drivers/netlink.c
139endif
140
141ifdef NEED_LINUX_IOCTL
142DRV_OBJS += src/drivers/linux_ioctl.c
143endif
144
145ifdef NEED_RFKILL
146DRV_OBJS += src/drivers/rfkill.c
147endif
148
149ifdef NEED_RADIOTAP
150DRV_OBJS += src/utils/radiotap.c
151endif
152
153ifdef CONFIG_DRIVER_CUSTOM
154DRV_CFLAGS += -DCONFIG_DRIVER_CUSTOM
155endif
156
157ifdef CONFIG_VLAN_NETLINK
158ifdef CONFIG_FULL_DYNAMIC_VLAN
159NEED_LIBNL=y
160CONFIG_LIBNL3_ROUTE=y
161endif
162endif
163
164ifdef NEED_LIBNL
165ifdef CONFIG_LIBNL32
166  DRV_LIBS += -lnl-3
167  DRV_LIBS += -lnl-genl-3
168  DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
169ifdef CONFIG_LIBNL3_ROUTE
170  DRV_LIBS += -lnl-route-3
171  DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE
172endif
173else
174  ifdef CONFIG_LIBNL_TINY
175    DRV_LIBS += -lnl-tiny
176  else
177    DRV_LIBS += -lnl
178  endif
179
180  ifdef CONFIG_LIBNL20
181    ifndef CONFIG_LIBNL_TINY
182      DRV_LIBS += -lnl-genl
183    endif
184    DRV_CFLAGS += -DCONFIG_LIBNL20
185  endif
186endif
187endif
188
189##### COMMON VARS
190DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS)
191DRV_WPA_CFLAGS += $(DRV_CFLAGS)
192DRV_AP_CFLAGS += $(DRV_CFLAGS)
193
194DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS)
195DRV_WPA_LIBS += $(DRV_LIBS)
196DRV_AP_LIBS += $(DRV_LIBS)
197
198DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS)
199DRV_WPA_OBJS += $(DRV_OBJS)
200DRV_AP_OBJS += $(DRV_OBJS)
201
202DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS)
203DRV_WPA_LDFLAGS += $(DRV_LDFLAGS)
204DRV_AP_LDFLAGS += $(DRV_LDFLAGS)
205