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