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 76##### PURE AP DRIVERS 77 78ifdef CONFIG_DRIVER_HOSTAP 79DRV_AP_CFLAGS += -DCONFIG_DRIVER_HOSTAP 80DRV_AP_OBJS += src/drivers/driver_hostap.c 81CONFIG_WIRELESS_EXTENSION=y 82NEED_AP_MLME=y 83NEED_NETLINK=y 84NEED_LINUX_IOCTL=y 85endif 86 87ifdef CONFIG_DRIVER_ATHEROS 88DRV_AP_CFLAGS += -DCONFIG_DRIVER_ATHEROS 89DRV_AP_OBJS += src/drivers/driver_atheros.c 90CONFIG_L2_PACKET=linux 91NEED_NETLINK=y 92NEED_LINUX_IOCTL=y 93endif 94 95##### PURE CLIENT DRIVERS 96 97ifdef CONFIG_DRIVER_WEXT 98DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT 99CONFIG_WIRELESS_EXTENSION=y 100NEED_NETLINK=y 101NEED_LINUX_IOCTL=y 102NEED_RFKILL=y 103endif 104 105ifdef CONFIG_DRIVER_NDIS 106DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS 107DRV_WPA_OBJS += src/drivers/driver_ndis.c 108ifdef CONFIG_NDIS_EVENTS_INTEGRATED 109DRV_WPA_OBJS += src/drivers/driver_ndis_.c 110endif 111ifndef CONFIG_L2_PACKET 112CONFIG_L2_PACKET=pcap 113endif 114CONFIG_WINPCAP=y 115ifdef CONFIG_USE_NDISUIO 116DRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO 117endif 118endif 119 120ifdef CONFIG_DRIVER_ROBOSWITCH 121DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH 122DRV_WPA_OBJS += src/drivers/driver_roboswitch.c 123endif 124 125ifdef CONFIG_WIRELESS_EXTENSION 126DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION 127DRV_WPA_OBJS += src/drivers/driver_wext.c 128NEED_RFKILL=y 129endif 130 131ifdef NEED_NETLINK 132DRV_OBJS += src/drivers/netlink.c 133endif 134 135ifdef NEED_LINUX_IOCTL 136DRV_OBJS += src/drivers/linux_ioctl.c 137endif 138 139ifdef NEED_RFKILL 140DRV_OBJS += src/drivers/rfkill.c 141endif 142 143ifdef NEED_RADIOTAP 144DRV_OBJS += src/utils/radiotap.c 145endif 146 147ifdef CONFIG_DRIVER_CUSTOM 148DRV_CFLAGS += -DCONFIG_DRIVER_CUSTOM 149endif 150 151ifdef CONFIG_VLAN_NETLINK 152ifdef CONFIG_FULL_DYNAMIC_VLAN 153NEED_LIBNL=y 154CONFIG_LIBNL3_ROUTE=y 155endif 156endif 157 158ifdef NEED_LIBNL 159ifdef CONFIG_LIBNL32 160 DRV_LIBS += -lnl-3 161 DRV_LIBS += -lnl-genl-3 162 DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3 163ifdef CONFIG_LIBNL3_ROUTE 164 DRV_LIBS += -lnl-route-3 165 DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE 166endif 167else 168 ifdef CONFIG_LIBNL_TINY 169 DRV_LIBS += -lnl-tiny 170 else 171 DRV_LIBS += -lnl 172 endif 173 174 ifdef CONFIG_LIBNL20 175 ifndef CONFIG_LIBNL_TINY 176 DRV_LIBS += -lnl-genl 177 endif 178 DRV_CFLAGS += -DCONFIG_LIBNL20 179 endif 180endif 181endif 182 183##### COMMON VARS 184DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS) 185DRV_WPA_CFLAGS += $(DRV_CFLAGS) 186DRV_AP_CFLAGS += $(DRV_CFLAGS) 187 188DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS) 189DRV_WPA_LIBS += $(DRV_LIBS) 190DRV_AP_LIBS += $(DRV_LIBS) 191 192DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS) 193DRV_WPA_OBJS += $(DRV_OBJS) 194DRV_AP_OBJS += $(DRV_OBJS) 195 196DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS) 197DRV_WPA_LDFLAGS += $(DRV_LDFLAGS) 198DRV_AP_LDFLAGS += $(DRV_LDFLAGS) 199