blob: cd25133af8088f7387e94795d3f78ea76367b250 [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001##### 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
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070015ifdef CONFIG_DRIVER_WIRED
16DRV_CFLAGS += -DCONFIG_DRIVER_WIRED
17DRV_OBJS += src/drivers/driver_wired.c
Dmitry Shmidtabb90a32016-12-05 15:34:39 -080018NEED_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
26endif
27
28ifdef NEED_DRV_WIRED_COMMON
29DRV_OBJS += src/drivers/driver_wired_common.c
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070030endif
31
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070032ifdef CONFIG_DRIVER_NL80211
33DRV_CFLAGS += -DCONFIG_DRIVER_NL80211
34DRV_OBJS += src/drivers/driver_nl80211.c
Dmitry Shmidtfb45fd52015-01-05 13:08:17 -080035DRV_OBJS += src/drivers/driver_nl80211_android.c
36DRV_OBJS += src/drivers/driver_nl80211_capa.c
37DRV_OBJS += src/drivers/driver_nl80211_event.c
38DRV_OBJS += src/drivers/driver_nl80211_monitor.c
39DRV_OBJS += src/drivers/driver_nl80211_scan.c
Dmitry Shmidtd80a4012015-11-05 16:35:40 -080040ifdef CONFIG_DRIVER_NL80211_QCA
41DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_QCA
42endif
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070043NEED_SME=y
44NEED_AP_MLME=y
45NEED_NETLINK=y
46NEED_LINUX_IOCTL=y
47NEED_RFKILL=y
Dmitry Shmidt849734c2016-05-27 09:59:01 -070048NEED_RADIOTAP=y
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070049
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080050ifdef CONFIG_LIBNL32
51 DRV_LIBS += -lnl-3
52 DRV_LIBS += -lnl-genl-3
Dmitry Shmidt61d9df32012-08-29 16:22:06 -070053 DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
Dmitry Shmidt661b4f72014-09-29 14:58:27 -070054ifdef CONFIG_LIBNL3_ROUTE
55 DRV_LIBS += -lnl-route-3
56 DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE
57endif
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080058else
59 ifdef CONFIG_LIBNL_TINY
60 DRV_LIBS += -lnl-tiny
61 else
62 DRV_LIBS += -lnl
63 endif
64
65 ifdef CONFIG_LIBNL20
Dmitry Shmidte4663042016-04-04 10:07:49 -070066 ifndef CONFIG_LIBNL_TINY
67 DRV_LIBS += -lnl-genl
68 endif
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080069 DRV_CFLAGS += -DCONFIG_LIBNL20
70 endif
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070071endif
72endif
73
74ifdef CONFIG_DRIVER_BSD
75ifndef CONFIG_L2_PACKET
76CONFIG_L2_PACKET=freebsd
77endif
78DRV_CFLAGS += -DCONFIG_DRIVER_BSD
79DRV_OBJS += src/drivers/driver_bsd.c
80CONFIG_L2_FREEBSD=y
81CONFIG_DNET_PCAP=y
82endif
83
Dmitry Shmidt4b9d52f2013-02-05 17:44:43 -080084ifdef CONFIG_DRIVER_OPENBSD
85ifndef CONFIG_L2_PACKET
86CONFIG_L2_PACKET=freebsd
87endif
88DRV_CFLAGS += -DCONFIG_DRIVER_OPENBSD
89DRV_OBJS += src/drivers/driver_openbsd.c
90endif
91
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070092ifdef CONFIG_DRIVER_NONE
93DRV_CFLAGS += -DCONFIG_DRIVER_NONE
94DRV_OBJS += src/drivers/driver_none.c
95endif
96
97##### PURE AP DRIVERS
98
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080099ifdef CONFIG_DRIVER_HOSTAP
100DRV_AP_CFLAGS += -DCONFIG_DRIVER_HOSTAP
101DRV_AP_OBJS += src/drivers/driver_hostap.c
102CONFIG_WIRELESS_EXTENSION=y
103NEED_AP_MLME=y
104NEED_NETLINK=y
105NEED_LINUX_IOCTL=y
106endif
107
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700108ifdef CONFIG_DRIVER_ATHEROS
109DRV_AP_CFLAGS += -DCONFIG_DRIVER_ATHEROS
110DRV_AP_OBJS += src/drivers/driver_atheros.c
111CONFIG_L2_PACKET=linux
112NEED_NETLINK=y
113NEED_LINUX_IOCTL=y
114endif
115
116##### PURE CLIENT DRIVERS
117
118ifdef CONFIG_DRIVER_WEXT
119DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
120CONFIG_WIRELESS_EXTENSION=y
121NEED_NETLINK=y
122NEED_LINUX_IOCTL=y
123NEED_RFKILL=y
124endif
125
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700126ifdef CONFIG_DRIVER_NDIS
127DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS
128DRV_WPA_OBJS += src/drivers/driver_ndis.c
129ifdef CONFIG_NDIS_EVENTS_INTEGRATED
130DRV_WPA_OBJS += src/drivers/driver_ndis_.c
131endif
132ifndef CONFIG_L2_PACKET
133CONFIG_L2_PACKET=pcap
134endif
135CONFIG_WINPCAP=y
136ifdef CONFIG_USE_NDISUIO
137DRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO
138endif
139endif
140
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700141ifdef CONFIG_DRIVER_ROBOSWITCH
142DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH
143DRV_WPA_OBJS += src/drivers/driver_roboswitch.c
144endif
145
146ifdef CONFIG_WIRELESS_EXTENSION
147DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
148DRV_WPA_OBJS += src/drivers/driver_wext.c
149NEED_RFKILL=y
150endif
151
152ifdef NEED_NETLINK
153DRV_OBJS += src/drivers/netlink.c
154endif
155
156ifdef NEED_LINUX_IOCTL
157DRV_OBJS += src/drivers/linux_ioctl.c
158endif
159
160ifdef NEED_RFKILL
161DRV_OBJS += src/drivers/rfkill.c
162endif
163
Dmitry Shmidt849734c2016-05-27 09:59:01 -0700164ifdef NEED_RADIOTAP
165DRV_OBJS += src/utils/radiotap.c
166endif
167
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700168ifdef CONFIG_DRIVER_CUSTOM
169DRV_CFLAGS += -DCONFIG_DRIVER_CUSTOM
170endif
171
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700172ifdef CONFIG_VLAN_NETLINK
173ifdef CONFIG_FULL_DYNAMIC_VLAN
174ifdef CONFIG_LIBNL32
175 DRV_LIBS += -lnl-3
176 DRV_LIBS += -lnl-genl-3
177 DRV_LIBS += -lnl-route-3
178 DRV_CFLAGS += -DCONFIG_LIBNL20
179else
180 ifdef CONFIG_LIBNL_TINY
181 DRV_LIBS += -lnl-tiny
182 else
183 DRV_LIBS += -lnl
184 endif
185
186 ifdef CONFIG_LIBNL20
187 DRV_LIBS += -lnl-genl
188 DRV_LIBS += -lnl-route
189 DRV_CFLAGS += -DCONFIG_LIBNL20
190 endif
191endif
192endif
193endif
194
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700195##### COMMON VARS
196DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS)
197DRV_WPA_CFLAGS += $(DRV_CFLAGS)
198DRV_AP_CFLAGS += $(DRV_CFLAGS)
199
200DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS)
201DRV_WPA_LIBS += $(DRV_LIBS)
202DRV_AP_LIBS += $(DRV_LIBS)
203
204DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS)
205DRV_WPA_OBJS += $(DRV_OBJS)
206DRV_AP_OBJS += $(DRV_OBJS)
207
208DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS)
209DRV_WPA_LDFLAGS += $(DRV_LDFLAGS)
210DRV_AP_LDFLAGS += $(DRV_LDFLAGS)