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.c 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.c 24e5b75505Sopenharmony_ciNEED_DRV_WIRED_COMMON=1 25e5b75505Sopenharmony_ciCONFIG_LIBNL3_ROUTE=y 26e5b75505Sopenharmony_ciNEED_LIBNL=y 27e5b75505Sopenharmony_ciendif 28e5b75505Sopenharmony_ci 29e5b75505Sopenharmony_ciifdef NEED_DRV_WIRED_COMMON 30e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_wired_common.c 31e5b75505Sopenharmony_ciendif 32e5b75505Sopenharmony_ci 33e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_NL80211 34e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_NL80211 35e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_nl80211.c 36e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_nl80211_android.c 37e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_nl80211_capa.c 38e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_nl80211_event.c 39e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_nl80211_monitor.c 40e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_nl80211_scan.c 41e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_NL80211_QCA 42e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_NL80211_QCA 43e5b75505Sopenharmony_ciendif 44e5b75505Sopenharmony_ciNEED_SME=y 45e5b75505Sopenharmony_ciNEED_AP_MLME=y 46e5b75505Sopenharmony_ciNEED_NETLINK=y 47e5b75505Sopenharmony_ciNEED_LINUX_IOCTL=y 48e5b75505Sopenharmony_ciNEED_RFKILL=y 49e5b75505Sopenharmony_ciNEED_RADIOTAP=y 50e5b75505Sopenharmony_ciNEED_LIBNL=y 51e5b75505Sopenharmony_ciendif 52e5b75505Sopenharmony_ci 53e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_BSD 54e5b75505Sopenharmony_ciifndef CONFIG_L2_PACKET 55e5b75505Sopenharmony_ciCONFIG_L2_PACKET=freebsd 56e5b75505Sopenharmony_ciendif 57e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_BSD 58e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_bsd.c 59e5b75505Sopenharmony_ciCONFIG_L2_FREEBSD=y 60e5b75505Sopenharmony_ciCONFIG_DNET_PCAP=y 61e5b75505Sopenharmony_ciendif 62e5b75505Sopenharmony_ci 63e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_OPENBSD 64e5b75505Sopenharmony_ciifndef CONFIG_L2_PACKET 65e5b75505Sopenharmony_ciCONFIG_L2_PACKET=freebsd 66e5b75505Sopenharmony_ciendif 67e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_OPENBSD 68e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_openbsd.c 69e5b75505Sopenharmony_ciendif 70e5b75505Sopenharmony_ci 71e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_NONE 72e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_NONE 73e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/driver_none.c 74e5b75505Sopenharmony_ciendif 75e5b75505Sopenharmony_ci 76e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_HDF 77e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_HDF 78e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/wpa_hal.c 79e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/wpa_hal_event.c 80e5b75505Sopenharmony_ciendif 81e5b75505Sopenharmony_ci 82e5b75505Sopenharmony_ci##### PURE AP DRIVERS 83e5b75505Sopenharmony_ci 84e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_HOSTAP 85e5b75505Sopenharmony_ciDRV_AP_CFLAGS += -DCONFIG_DRIVER_HOSTAP 86e5b75505Sopenharmony_ciDRV_AP_OBJS += src/drivers/driver_hostap.c 87e5b75505Sopenharmony_ciCONFIG_WIRELESS_EXTENSION=y 88e5b75505Sopenharmony_ciNEED_AP_MLME=y 89e5b75505Sopenharmony_ciNEED_NETLINK=y 90e5b75505Sopenharmony_ciNEED_LINUX_IOCTL=y 91e5b75505Sopenharmony_ciendif 92e5b75505Sopenharmony_ci 93e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_ATHEROS 94e5b75505Sopenharmony_ciDRV_AP_CFLAGS += -DCONFIG_DRIVER_ATHEROS 95e5b75505Sopenharmony_ciDRV_AP_OBJS += src/drivers/driver_atheros.c 96e5b75505Sopenharmony_ciCONFIG_L2_PACKET=linux 97e5b75505Sopenharmony_ciNEED_NETLINK=y 98e5b75505Sopenharmony_ciNEED_LINUX_IOCTL=y 99e5b75505Sopenharmony_ciendif 100e5b75505Sopenharmony_ci 101e5b75505Sopenharmony_ci##### PURE CLIENT DRIVERS 102e5b75505Sopenharmony_ci 103e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_WEXT 104e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT 105e5b75505Sopenharmony_ciCONFIG_WIRELESS_EXTENSION=y 106e5b75505Sopenharmony_ciNEED_NETLINK=y 107e5b75505Sopenharmony_ciNEED_LINUX_IOCTL=y 108e5b75505Sopenharmony_ciNEED_RFKILL=y 109e5b75505Sopenharmony_ciendif 110e5b75505Sopenharmony_ci 111e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_NDIS 112e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS 113e5b75505Sopenharmony_ciDRV_WPA_OBJS += src/drivers/driver_ndis.c 114e5b75505Sopenharmony_ciifdef CONFIG_NDIS_EVENTS_INTEGRATED 115e5b75505Sopenharmony_ciDRV_WPA_OBJS += src/drivers/driver_ndis_.c 116e5b75505Sopenharmony_ciendif 117e5b75505Sopenharmony_ciifndef CONFIG_L2_PACKET 118e5b75505Sopenharmony_ciCONFIG_L2_PACKET=pcap 119e5b75505Sopenharmony_ciendif 120e5b75505Sopenharmony_ciCONFIG_WINPCAP=y 121e5b75505Sopenharmony_ciifdef CONFIG_USE_NDISUIO 122e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO 123e5b75505Sopenharmony_ciendif 124e5b75505Sopenharmony_ciendif 125e5b75505Sopenharmony_ci 126e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_ROBOSWITCH 127e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH 128e5b75505Sopenharmony_ciDRV_WPA_OBJS += src/drivers/driver_roboswitch.c 129e5b75505Sopenharmony_ciendif 130e5b75505Sopenharmony_ci 131e5b75505Sopenharmony_ciifdef CONFIG_WIRELESS_EXTENSION 132e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION 133e5b75505Sopenharmony_ciDRV_WPA_OBJS += src/drivers/driver_wext.c 134e5b75505Sopenharmony_ciNEED_RFKILL=y 135e5b75505Sopenharmony_ciendif 136e5b75505Sopenharmony_ci 137e5b75505Sopenharmony_ciifdef NEED_NETLINK 138e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/netlink.c 139e5b75505Sopenharmony_ciendif 140e5b75505Sopenharmony_ci 141e5b75505Sopenharmony_ciifdef NEED_LINUX_IOCTL 142e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/linux_ioctl.c 143e5b75505Sopenharmony_ciendif 144e5b75505Sopenharmony_ci 145e5b75505Sopenharmony_ciifdef NEED_RFKILL 146e5b75505Sopenharmony_ciDRV_OBJS += src/drivers/rfkill.c 147e5b75505Sopenharmony_ciendif 148e5b75505Sopenharmony_ci 149e5b75505Sopenharmony_ciifdef NEED_RADIOTAP 150e5b75505Sopenharmony_ciDRV_OBJS += src/utils/radiotap.c 151e5b75505Sopenharmony_ciendif 152e5b75505Sopenharmony_ci 153e5b75505Sopenharmony_ciifdef CONFIG_DRIVER_CUSTOM 154e5b75505Sopenharmony_ciDRV_CFLAGS += -DCONFIG_DRIVER_CUSTOM 155e5b75505Sopenharmony_ciendif 156e5b75505Sopenharmony_ci 157e5b75505Sopenharmony_ciifdef CONFIG_VLAN_NETLINK 158e5b75505Sopenharmony_ciifdef CONFIG_FULL_DYNAMIC_VLAN 159e5b75505Sopenharmony_ciNEED_LIBNL=y 160e5b75505Sopenharmony_ciCONFIG_LIBNL3_ROUTE=y 161e5b75505Sopenharmony_ciendif 162e5b75505Sopenharmony_ciendif 163e5b75505Sopenharmony_ci 164e5b75505Sopenharmony_ciifdef NEED_LIBNL 165e5b75505Sopenharmony_ciifdef CONFIG_LIBNL32 166e5b75505Sopenharmony_ci DRV_LIBS += -lnl-3 167e5b75505Sopenharmony_ci DRV_LIBS += -lnl-genl-3 168e5b75505Sopenharmony_ci DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3 169e5b75505Sopenharmony_ciifdef CONFIG_LIBNL3_ROUTE 170e5b75505Sopenharmony_ci DRV_LIBS += -lnl-route-3 171e5b75505Sopenharmony_ci DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE 172e5b75505Sopenharmony_ciendif 173e5b75505Sopenharmony_cielse 174e5b75505Sopenharmony_ci ifdef CONFIG_LIBNL_TINY 175e5b75505Sopenharmony_ci DRV_LIBS += -lnl-tiny 176e5b75505Sopenharmony_ci else 177e5b75505Sopenharmony_ci DRV_LIBS += -lnl 178e5b75505Sopenharmony_ci endif 179e5b75505Sopenharmony_ci 180e5b75505Sopenharmony_ci ifdef CONFIG_LIBNL20 181e5b75505Sopenharmony_ci ifndef CONFIG_LIBNL_TINY 182e5b75505Sopenharmony_ci DRV_LIBS += -lnl-genl 183e5b75505Sopenharmony_ci endif 184e5b75505Sopenharmony_ci DRV_CFLAGS += -DCONFIG_LIBNL20 185e5b75505Sopenharmony_ci endif 186e5b75505Sopenharmony_ciendif 187e5b75505Sopenharmony_ciendif 188e5b75505Sopenharmony_ci 189e5b75505Sopenharmony_ci##### COMMON VARS 190e5b75505Sopenharmony_ciDRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS) 191e5b75505Sopenharmony_ciDRV_WPA_CFLAGS += $(DRV_CFLAGS) 192e5b75505Sopenharmony_ciDRV_AP_CFLAGS += $(DRV_CFLAGS) 193e5b75505Sopenharmony_ci 194e5b75505Sopenharmony_ciDRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS) 195e5b75505Sopenharmony_ciDRV_WPA_LIBS += $(DRV_LIBS) 196e5b75505Sopenharmony_ciDRV_AP_LIBS += $(DRV_LIBS) 197e5b75505Sopenharmony_ci 198e5b75505Sopenharmony_ciDRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS) 199e5b75505Sopenharmony_ciDRV_WPA_OBJS += $(DRV_OBJS) 200e5b75505Sopenharmony_ciDRV_AP_OBJS += $(DRV_OBJS) 201e5b75505Sopenharmony_ci 202e5b75505Sopenharmony_ciDRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS) 203e5b75505Sopenharmony_ciDRV_WPA_LDFLAGS += $(DRV_LDFLAGS) 204e5b75505Sopenharmony_ciDRV_AP_LDFLAGS += $(DRV_LDFLAGS) 205