1e5b75505Sopenharmony_ci##### CLEAR VARS 2e5b75505Sopenharmony_ci 3e5b75505Sopenharmony_ciDRV_CFLAGS = 4e5b75505Sopenharmony_ciDRV_WPA_CFLAGS = 5e5b75505Sopenharmony_ciDRV_AP_CFLAGS = 6e5b75505Sopenharmony_ciDRV_OBJS = 7e5b75505Sopenharmony_ciDRV_WPA_OBJS = 8e5b75505Sopenharmony_ciDRV_AP_OBJS = 9e5b75505Sopenharmony_ciDRV_LIBS = 10e5b75505Sopenharmony_ciDRV_WPA_LIBS = 11e5b75505Sopenharmony_ciDRV_AP_LIBS = 12e5b75505Sopenharmony_ci 13e5b75505Sopenharmony_ci##### COMMON DRIVERS 14e5b75505Sopenharmony_ci 15e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_WIRED 16e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_WIRED 17e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_wired.o 18e5b75505Sopenharmony_ciNEED_DRV_WIRED_COMMON=1 19e5b75505Sopenharmony_ciendif 20e5b75505Sopenharmony_ci 21e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_MACSEC_LINUX 22e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_MACSEC_LINUX 23e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_macsec_linux.o 24e5b75505Sopenharmony_ciNEED_DRV_WIRED_COMMON=1 25e5b75505Sopenharmony_ciNEED_LIBNL=y 26e5b75505Sopenharmony_ciCONFIG_LIBNL3_ROUTE=y 27e5b75505Sopenharmony_ciendif 28e5b75505Sopenharmony_ci 29e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_MACSEC_QCA 30e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_MACSEC_QCA 31e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_macsec_qca.o 32e5b75505Sopenharmony_ciNEED_DRV_WIRED_COMMON=1 33e5b75505Sopenharmony_ciendif 34e5b75505Sopenharmony_ci 35e5b75505Sopenharmony_ciifdef NEED_DRV_WIRED_COMMON 36e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_wired_common.o 37e5b75505Sopenharmony_ciendif 38e5b75505Sopenharmony_ci 39e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_NL80211 40e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_NL80211 41e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_nl80211.o 42e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_nl80211_capa.o 43e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_nl80211_event.o 44e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_nl80211_monitor.o 45e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_nl80211_scan.o 46e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_NL80211_QCA 47e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_NL80211_QCA 48e5b75505Sopenharmony_ciendif 49e5b75505Sopenharmony_ciNEED_SME=y 50e5b75505Sopenharmony_ciNEED_AP_MLME=y 51e5b75505Sopenharmony_ciNEED_NETLINK=y 52e5b75505Sopenharmony_ciNEED_LINUX_IOCTL=y 53e5b75505Sopenharmony_ciNEED_RFKILL=y 54e5b75505Sopenharmony_ciNEED_RADIOTAP=y 55e5b75505Sopenharmony_ciNEED_LIBNL=y 56e5b75505Sopenharmony_ciendif 57e5b75505Sopenharmony_ci 58e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_BSD 59e5b75505Sopenharmony_ciifndef CONFIG_L2_PACKET 60e5b75505Sopenharmony_ciCONFIG_L2_PACKET=freebsd 61e5b75505Sopenharmony_ciendif 62e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_BSD 63e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_bsd.o 64e5b75505Sopenharmony_ciCONFIG_L2_FREEBSD=y 65e5b75505Sopenharmony_ciCONFIG_DNET_PCAP=y 66e5b75505Sopenharmony_ciendif 67e5b75505Sopenharmony_ci 68e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_OPENBSD 69e5b75505Sopenharmony_ciifndef CONFIG_L2_PACKET 70e5b75505Sopenharmony_ciCONFIG_L2_PACKET=freebsd 71e5b75505Sopenharmony_ciendif 72e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_OPENBSD 73e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_openbsd.o 74e5b75505Sopenharmony_ciendif 75e5b75505Sopenharmony_ci 76e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_NONE 77e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_NONE 78e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/driver_none.o 79e5b75505Sopenharmony_ciendif 80e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_HDF 81e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_HDF 82e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/wpa_hal_event.o 83e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/wpa_hal.o 84e5b75505Sopenharmony_ciendif 85e5b75505Sopenharmony_ci 86e5b75505Sopenharmony_ci 87e5b75505Sopenharmony_ci##### PURE AP DRIVERS 88e5b75505Sopenharmony_ci 89e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_HOSTAP 90e5b75505Sopenharmony_ciDRV_AP_CFLAGS += -DCONFIG_DRIVER_HOSTAP 91e5b75505Sopenharmony_ciDRV_AP_OBJS += ../src/drivers/driver_hostap.o 92e5b75505Sopenharmony_ciCONFIG_WIRELESS_EXTENSION=y 93e5b75505Sopenharmony_ciNEED_AP_MLME=y 94e5b75505Sopenharmony_ciNEED_NETLINK=y 95e5b75505Sopenharmony_ciNEED_LINUX_IOCTL=y 96e5b75505Sopenharmony_ciendif 97e5b75505Sopenharmony_ci 98e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_ATHEROS 99e5b75505Sopenharmony_ciDRV_AP_CFLAGS += -DCONFIG_DRIVER_ATHEROS 100e5b75505Sopenharmony_ciDRV_AP_OBJS += ../src/drivers/driver_atheros.o 101e5b75505Sopenharmony_ciCONFIG_L2_PACKET=linux 102e5b75505Sopenharmony_ciNEED_NETLINK=y 103e5b75505Sopenharmony_ciNEED_LINUX_IOCTL=y 104e5b75505Sopenharmony_ciifdef ATH_GCM_SUPPORT 105e5b75505Sopenharmony_ciCFLAGS += -DATH_GCM_SUPPORT 106e5b75505Sopenharmony_ciendif 107e5b75505Sopenharmony_ciendif 108e5b75505Sopenharmony_ci 109e5b75505Sopenharmony_ci##### PURE CLIENT DRIVERS 110e5b75505Sopenharmony_ci 111e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_WEXT 112e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT 113e5b75505Sopenharmony_ciCONFIG_WIRELESS_EXTENSION=y 114e5b75505Sopenharmony_ciNEED_NETLINK=y 115e5b75505Sopenharmony_ciNEED_LINUX_IOCTL=y 116e5b75505Sopenharmony_ciNEED_RFKILL=y 117e5b75505Sopenharmony_ciendif 118e5b75505Sopenharmony_ci 119e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_NDIS 120e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS 121e5b75505Sopenharmony_ciDRV_WPA_OBJS += ../src/drivers/driver_ndis.o 122e5b75505Sopenharmony_ciifdef CONFIG_NDIS_EVENTS_INTEGRATED 123e5b75505Sopenharmony_ciDRV_WPA_OBJS += ../src/drivers/driver_ndis_.o 124e5b75505Sopenharmony_ciendif 125e5b75505Sopenharmony_ciifndef CONFIG_L2_PACKET 126e5b75505Sopenharmony_ciCONFIG_L2_PACKET=pcap 127e5b75505Sopenharmony_ciendif 128e5b75505Sopenharmony_ciCONFIG_WINPCAP=y 129e5b75505Sopenharmony_ciifdef CONFIG_USE_NDISUIO 130e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO 131e5b75505Sopenharmony_ciendif 132e5b75505Sopenharmony_ciendif 133e5b75505Sopenharmony_ci 134e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_ROBOSWITCH 135e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH 136e5b75505Sopenharmony_ciDRV_WPA_OBJS += ../src/drivers/driver_roboswitch.o 137e5b75505Sopenharmony_ciendif 138e5b75505Sopenharmony_ci 139e5b75505Sopenharmony_ciifdef CONFIG_WIRELESS_EXTENSION 140e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION 141e5b75505Sopenharmony_ciDRV_WPA_OBJS += ../src/drivers/driver_wext.o 142e5b75505Sopenharmony_ciNEED_RFKILL=y 143e5b75505Sopenharmony_ciendif 144e5b75505Sopenharmony_ci 145e5b75505Sopenharmony_ciifdef NEED_NETLINK 146e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/netlink.o 147e5b75505Sopenharmony_ciendif 148e5b75505Sopenharmony_ci 149e5b75505Sopenharmony_ciifdef NEED_LINUX_IOCTL 150e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/linux_ioctl.o 151e5b75505Sopenharmony_ciendif 152e5b75505Sopenharmony_ci 153e5b75505Sopenharmony_ciifdef NEED_RFKILL 154e5b75505Sopenharmony_ciDRV_OBJS += ../src/drivers/rfkill.o 155e5b75505Sopenharmony_ciendif 156e5b75505Sopenharmony_ci 157e5b75505Sopenharmony_ciifdef NEED_RADIOTAP 158e5b75505Sopenharmony_ciDRV_OBJS += ../src/utils/radiotap.o 159e5b75505Sopenharmony_ciendif 160e5b75505Sopenharmony_ci 161e5b75505Sopenharmony_ciifdef CONFIG_VLAN_NETLINK 162e5b75505Sopenharmony_ciifdef CONFIG_FULL_DYNAMIC_VLAN 163e5b75505Sopenharmony_ciNEED_LIBNL=y 164e5b75505Sopenharmony_ciCONFIG_LIBNL3_ROUTE=y 165e5b75505Sopenharmony_ciendif 166e5b75505Sopenharmony_ciendif 167e5b75505Sopenharmony_ci 168e5b75505Sopenharmony_ciifdef NEED_LIBNL 169e5b75505Sopenharmony_ciifndef CONFIG_LIBNL32 170e5b75505Sopenharmony_ciifndef CONFIG_LIBNL20 171e5b75505Sopenharmony_ciifndef CONFIG_LIBNL_TINY 172e5b75505Sopenharmony_ciPKG_CONFIG ?= pkg-config 173e5b75505Sopenharmony_ciHAVE_LIBNL3 := $(shell $(PKG_CONFIG) --exists libnl-3.0; echo $$?) 174e5b75505Sopenharmony_ciifeq ($(HAVE_LIBNL3),0) 175e5b75505Sopenharmony_ciCONFIG_LIBNL32=y 176e5b75505Sopenharmony_ciendif 177e5b75505Sopenharmony_ciendif 178e5b75505Sopenharmony_ciendif 179e5b75505Sopenharmony_ciendif 180e5b75505Sopenharmony_ci 181e5b75505Sopenharmony_ciifdef CONFIG_LIBNL32 182e5b75505Sopenharmony_ci DRV_LIBS += -lnl-3 183e5b75505Sopenharmony_ci DRV_LIBS += -lnl-genl-3 184e5b75505Sopenharmony_ci DRV_CFLAGS += -DCONFIG_LIBNL20 185e5b75505Sopenharmony_ci ifdef LIBNL_INC 186e5b75505Sopenharmony_ci DRV_CFLAGS += -I$(LIBNL_INC) 187e5b75505Sopenharmony_ci else 188e5b75505Sopenharmony_ci PKG_CONFIG ?= pkg-config 189e5b75505Sopenharmony_ci DRV_CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-3.0) 190e5b75505Sopenharmony_ci endif 191e5b75505Sopenharmony_ci ifdef CONFIG_LIBNL3_ROUTE 192e5b75505Sopenharmony_ci DRV_LIBS += -lnl-route-3 193e5b75505Sopenharmony_ci DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE 194e5b75505Sopenharmony_ci endif 195e5b75505Sopenharmony_cielse 196e5b75505Sopenharmony_ci ifdef CONFIG_LIBNL_TINY 197e5b75505Sopenharmony_ci DRV_LIBS += -lnl-tiny 198e5b75505Sopenharmony_ci else 199e5b75505Sopenharmony_ci ifndef CONFIG_OSX 200e5b75505Sopenharmony_ci DRV_LIBS += -lnl 201e5b75505Sopenharmony_ci endif 202e5b75505Sopenharmony_ci endif 203e5b75505Sopenharmony_ci 204e5b75505Sopenharmony_ci ifdef CONFIG_LIBNL20 205e5b75505Sopenharmony_ci ifndef CONFIG_LIBNL_TINY 206e5b75505Sopenharmony_ci DRV_LIBS += -lnl-genl 207e5b75505Sopenharmony_ci endif 208e5b75505Sopenharmony_ci DRV_CFLAGS += -DCONFIG_LIBNL20 209e5b75505Sopenharmony_ci endif 210e5b75505Sopenharmony_ciendif 211e5b75505Sopenharmony_ciendif 212e5b75505Sopenharmony_ci 213e5b75505Sopenharmony_ci##### COMMON VARS 214e5b75505Sopenharmony_ciDRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS) 215e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += $(DRV_CFLAGS) 216e5b75505Sopenharmony_ciDRV_AP_CFLAGS += $(DRV_CFLAGS) 217e5b75505Sopenharmony_ci 218e5b75505Sopenharmony_ciDRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS) 219e5b75505Sopenharmony_ciDRV_WPA_LIBS += $(DRV_LIBS) 220e5b75505Sopenharmony_ciDRV_AP_LIBS += $(DRV_LIBS) 221e5b75505Sopenharmony_ci 222e5b75505Sopenharmony_ciDRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS) 223e5b75505Sopenharmony_ciDRV_WPA_OBJS += $(DRV_OBJS) 224e5b75505Sopenharmony_ciDRV_AP_OBJS += $(DRV_OBJS) 225e5b75505Sopenharmony_ci 226e5b75505Sopenharmony_ciDRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS) 227e5b75505Sopenharmony_ciDRV_WPA_LDFLAGS += $(DRV_LDFLAGS) 228e5b75505Sopenharmony_ciDRV_AP_LDFLAGS += $(DRV_LDFLAGS) 229