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