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