blob: 8c58456ffae8a29bc2026163dd2a3f38011771cf [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
Hai Shalom74f70d42019-02-11 14:42:39 -080026NEED_LIBNL=y
Dmitry Shmidtabb90a32016-12-05 15:34:39 -080027endif
28
29ifdef NEED_DRV_WIRED_COMMON
30DRV_OBJS += src/drivers/driver_wired_common.c
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070031endif
32
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070033ifdef CONFIG_DRIVER_NL80211
34DRV_CFLAGS += -DCONFIG_DRIVER_NL80211
35DRV_OBJS += src/drivers/driver_nl80211.c
Dmitry Shmidtfb45fd52015-01-05 13:08:17 -080036DRV_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
Dmitry Shmidtd80a4012015-11-05 16:35:40 -080041ifdef CONFIG_DRIVER_NL80211_QCA
42DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_QCA
43endif
Ajay Davanagerib921bb82020-09-16 12:49:08 +053044ifdef CONFIG_DRIVER_NL80211_BRCM
45DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_BRCM
46endif
Andy Kuoaba17c12022-04-14 16:05:31 +080047ifdef CONFIG_DRIVER_NL80211_SYNA
48DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_SYNA
49endif
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070050NEED_SME=y
51NEED_AP_MLME=y
52NEED_NETLINK=y
53NEED_LINUX_IOCTL=y
54NEED_RFKILL=y
Dmitry Shmidt849734c2016-05-27 09:59:01 -070055NEED_RADIOTAP=y
Hai Shalom74f70d42019-02-11 14:42:39 -080056NEED_LIBNL=y
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070057endif
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.c
65CONFIG_L2_FREEBSD=y
66CONFIG_DNET_PCAP=y
67endif
68
Dmitry Shmidt4b9d52f2013-02-05 17:44:43 -080069ifdef CONFIG_DRIVER_OPENBSD
70ifndef CONFIG_L2_PACKET
71CONFIG_L2_PACKET=freebsd
72endif
73DRV_CFLAGS += -DCONFIG_DRIVER_OPENBSD
74DRV_OBJS += src/drivers/driver_openbsd.c
75endif
76
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070077ifdef CONFIG_DRIVER_NONE
78DRV_CFLAGS += -DCONFIG_DRIVER_NONE
79DRV_OBJS += src/drivers/driver_none.c
80endif
81
82##### PURE AP DRIVERS
83
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080084ifdef 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
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070093ifdef 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
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700111ifdef 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
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700126ifdef 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
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700141ifdef NEED_RFKILL
142DRV_OBJS += src/drivers/rfkill.c
143endif
144
Dmitry Shmidt849734c2016-05-27 09:59:01 -0700145ifdef NEED_RADIOTAP
146DRV_OBJS += src/utils/radiotap.c
147endif
148
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700149ifdef CONFIG_DRIVER_CUSTOM
150DRV_CFLAGS += -DCONFIG_DRIVER_CUSTOM
151endif
152
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700153ifdef CONFIG_FULL_DYNAMIC_VLAN
Ahmed ElArabawy0ff61c52019-12-26 12:38:39 -0800154NEED_LINUX_IOCTL=y
155ifdef CONFIG_VLAN_NETLINK
Hai Shalom74f70d42019-02-11 14:42:39 -0800156NEED_LIBNL=y
157CONFIG_LIBNL3_ROUTE=y
158endif
159endif
160
Ahmed ElArabawy0ff61c52019-12-26 12:38:39 -0800161ifdef NEED_LINUX_IOCTL
162DRV_OBJS += src/drivers/linux_ioctl.c
163endif
164
Hai Shalom74f70d42019-02-11 14:42:39 -0800165ifdef NEED_LIBNL
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700166ifdef CONFIG_LIBNL32
167 DRV_LIBS += -lnl-3
168 DRV_LIBS += -lnl-genl-3
Hai Shalomfdcde762020-04-02 11:19:20 -0700169 DRV_CFLAGS += -I/usr/include/libnl3
Hai Shalom74f70d42019-02-11 14:42:39 -0800170ifdef CONFIG_LIBNL3_ROUTE
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700171 DRV_LIBS += -lnl-route-3
Hai Shalom74f70d42019-02-11 14:42:39 -0800172 DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE
173endif
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700174else
175 ifdef CONFIG_LIBNL_TINY
176 DRV_LIBS += -lnl-tiny
177 else
178 DRV_LIBS += -lnl
Hai Shalomfdcde762020-04-02 11:19:20 -0700179 DRV_LIBS += -lnl-genl
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700180 endif
181endif
182endif
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700183
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700184##### COMMON VARS
185DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS)
186DRV_WPA_CFLAGS += $(DRV_CFLAGS)
187DRV_AP_CFLAGS += $(DRV_CFLAGS)
188
189DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS)
190DRV_WPA_LIBS += $(DRV_LIBS)
191DRV_AP_LIBS += $(DRV_LIBS)
192
193DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS)
194DRV_WPA_OBJS += $(DRV_OBJS)
195DRV_AP_OBJS += $(DRV_OBJS)
196
197DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS)
198DRV_WPA_LDFLAGS += $(DRV_LDFLAGS)
199DRV_AP_LDFLAGS += $(DRV_LDFLAGS)