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