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