2010-10-31 10:59:31 +01:00
|
|
|
##### CLEAR VARS
|
|
|
|
|
|
|
|
DRV_CFLAGS =
|
|
|
|
DRV_WPA_CFLAGS =
|
|
|
|
DRV_AP_CFLAGS =
|
|
|
|
DRV_OBJS =
|
|
|
|
DRV_WPA_OBJS =
|
|
|
|
DRV_AP_OBJS =
|
|
|
|
DRV_LIBS =
|
|
|
|
DRV_WPA_LIBS =
|
|
|
|
DRV_AP_LIBS =
|
|
|
|
|
2009-08-14 18:53:27 +02:00
|
|
|
##### COMMON DRIVERS
|
|
|
|
|
|
|
|
ifdef CONFIG_DRIVER_WIRED
|
|
|
|
DRV_CFLAGS += -DCONFIG_DRIVER_WIRED
|
|
|
|
DRV_OBJS += ../src/drivers/driver_wired.o
|
2016-11-27 20:08:45 +01:00
|
|
|
NEED_DRV_WIRED_COMMON=1
|
2009-08-14 18:53:27 +02:00
|
|
|
endif
|
|
|
|
|
2016-11-27 20:08:55 +01:00
|
|
|
ifdef CONFIG_DRIVER_MACSEC_LINUX
|
|
|
|
DRV_CFLAGS += -DCONFIG_DRIVER_MACSEC_LINUX
|
|
|
|
DRV_OBJS += ../src/drivers/driver_macsec_linux.o
|
|
|
|
NEED_DRV_WIRED_COMMON=1
|
2018-09-14 11:17:29 +02:00
|
|
|
NEED_LIBNL=y
|
2016-11-27 20:08:55 +01:00
|
|
|
CONFIG_LIBNL3_ROUTE=y
|
|
|
|
endif
|
|
|
|
|
2014-03-25 20:39:02 +01:00
|
|
|
ifdef CONFIG_DRIVER_MACSEC_QCA
|
|
|
|
DRV_CFLAGS += -DCONFIG_DRIVER_MACSEC_QCA
|
|
|
|
DRV_OBJS += ../src/drivers/driver_macsec_qca.o
|
2016-11-27 20:08:45 +01:00
|
|
|
NEED_DRV_WIRED_COMMON=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NEED_DRV_WIRED_COMMON
|
|
|
|
DRV_OBJS += ../src/drivers/driver_wired_common.o
|
2014-03-25 20:39:02 +01:00
|
|
|
endif
|
|
|
|
|
2009-08-14 18:53:27 +02:00
|
|
|
ifdef CONFIG_DRIVER_NL80211
|
|
|
|
DRV_CFLAGS += -DCONFIG_DRIVER_NL80211
|
|
|
|
DRV_OBJS += ../src/drivers/driver_nl80211.o
|
2014-10-26 12:28:39 +01:00
|
|
|
DRV_OBJS += ../src/drivers/driver_nl80211_capa.o
|
2014-10-26 15:13:27 +01:00
|
|
|
DRV_OBJS += ../src/drivers/driver_nl80211_event.o
|
2014-10-26 11:40:10 +01:00
|
|
|
DRV_OBJS += ../src/drivers/driver_nl80211_monitor.o
|
2014-12-06 16:59:26 +01:00
|
|
|
DRV_OBJS += ../src/drivers/driver_nl80211_scan.o
|
2015-09-29 16:11:21 +02:00
|
|
|
ifdef CONFIG_DRIVER_NL80211_QCA
|
|
|
|
DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_QCA
|
|
|
|
endif
|
2009-08-14 18:53:27 +02:00
|
|
|
NEED_SME=y
|
|
|
|
NEED_AP_MLME=y
|
2009-12-18 15:35:33 +01:00
|
|
|
NEED_NETLINK=y
|
2010-01-03 21:08:26 +01:00
|
|
|
NEED_LINUX_IOCTL=y
|
2010-05-23 09:27:32 +02:00
|
|
|
NEED_RFKILL=y
|
2016-05-12 09:26:10 +02:00
|
|
|
NEED_RADIOTAP=y
|
2018-09-14 11:17:29 +02:00
|
|
|
NEED_LIBNL=y
|
2009-08-14 18:53:27 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_DRIVER_BSD
|
|
|
|
ifndef CONFIG_L2_PACKET
|
|
|
|
CONFIG_L2_PACKET=freebsd
|
|
|
|
endif
|
|
|
|
DRV_CFLAGS += -DCONFIG_DRIVER_BSD
|
|
|
|
DRV_OBJS += ../src/drivers/driver_bsd.o
|
|
|
|
CONFIG_L2_FREEBSD=y
|
|
|
|
CONFIG_DNET_PCAP=y
|
|
|
|
endif
|
|
|
|
|
2013-02-03 20:16:29 +01:00
|
|
|
ifdef CONFIG_DRIVER_OPENBSD
|
|
|
|
ifndef CONFIG_L2_PACKET
|
|
|
|
CONFIG_L2_PACKET=freebsd
|
|
|
|
endif
|
|
|
|
DRV_CFLAGS += -DCONFIG_DRIVER_OPENBSD
|
|
|
|
DRV_OBJS += ../src/drivers/driver_openbsd.o
|
|
|
|
endif
|
|
|
|
|
2009-11-20 20:12:49 +01:00
|
|
|
ifdef CONFIG_DRIVER_NONE
|
|
|
|
DRV_CFLAGS += -DCONFIG_DRIVER_NONE
|
|
|
|
DRV_OBJS += ../src/drivers/driver_none.o
|
|
|
|
endif
|
|
|
|
|
2009-08-14 18:53:27 +02:00
|
|
|
##### PURE AP DRIVERS
|
|
|
|
|
2011-11-13 10:13:13 +01:00
|
|
|
ifdef CONFIG_DRIVER_HOSTAP
|
|
|
|
DRV_AP_CFLAGS += -DCONFIG_DRIVER_HOSTAP
|
|
|
|
DRV_AP_OBJS += ../src/drivers/driver_hostap.o
|
|
|
|
CONFIG_WIRELESS_EXTENSION=y
|
|
|
|
NEED_AP_MLME=y
|
|
|
|
NEED_NETLINK=y
|
|
|
|
NEED_LINUX_IOCTL=y
|
|
|
|
endif
|
|
|
|
|
2009-08-14 18:53:27 +02:00
|
|
|
ifdef CONFIG_DRIVER_ATHEROS
|
|
|
|
DRV_AP_CFLAGS += -DCONFIG_DRIVER_ATHEROS
|
|
|
|
DRV_AP_OBJS += ../src/drivers/driver_atheros.o
|
|
|
|
CONFIG_L2_PACKET=linux
|
2009-12-18 17:24:13 +01:00
|
|
|
NEED_NETLINK=y
|
2010-04-17 20:04:26 +02:00
|
|
|
NEED_LINUX_IOCTL=y
|
2014-06-09 18:19:30 +02:00
|
|
|
ifdef ATH_GCM_SUPPORT
|
|
|
|
CFLAGS += -DATH_GCM_SUPPORT
|
|
|
|
endif
|
2009-08-14 18:53:27 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
##### PURE CLIENT DRIVERS
|
|
|
|
|
|
|
|
ifdef CONFIG_DRIVER_WEXT
|
|
|
|
DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
|
|
|
|
CONFIG_WIRELESS_EXTENSION=y
|
2009-12-18 15:35:33 +01:00
|
|
|
NEED_NETLINK=y
|
2010-01-03 21:08:26 +01:00
|
|
|
NEED_LINUX_IOCTL=y
|
2010-05-23 09:27:32 +02:00
|
|
|
NEED_RFKILL=y
|
2009-08-14 18:53:27 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_DRIVER_NDIS
|
|
|
|
DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS
|
|
|
|
DRV_WPA_OBJS += ../src/drivers/driver_ndis.o
|
|
|
|
ifdef CONFIG_NDIS_EVENTS_INTEGRATED
|
|
|
|
DRV_WPA_OBJS += ../src/drivers/driver_ndis_.o
|
|
|
|
endif
|
|
|
|
ifndef CONFIG_L2_PACKET
|
|
|
|
CONFIG_L2_PACKET=pcap
|
|
|
|
endif
|
|
|
|
CONFIG_WINPCAP=y
|
|
|
|
ifdef CONFIG_USE_NDISUIO
|
|
|
|
DRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_DRIVER_ROBOSWITCH
|
|
|
|
DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH
|
|
|
|
DRV_WPA_OBJS += ../src/drivers/driver_roboswitch.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_WIRELESS_EXTENSION
|
|
|
|
DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
|
|
|
|
DRV_WPA_OBJS += ../src/drivers/driver_wext.o
|
2010-10-15 21:11:33 +02:00
|
|
|
NEED_RFKILL=y
|
2009-08-14 18:53:27 +02:00
|
|
|
endif
|
|
|
|
|
2009-12-18 15:35:33 +01:00
|
|
|
ifdef NEED_NETLINK
|
|
|
|
DRV_OBJS += ../src/drivers/netlink.o
|
|
|
|
endif
|
|
|
|
|
2010-05-23 09:27:32 +02:00
|
|
|
ifdef NEED_RFKILL
|
|
|
|
DRV_OBJS += ../src/drivers/rfkill.o
|
|
|
|
endif
|
|
|
|
|
2016-05-12 09:26:10 +02:00
|
|
|
ifdef NEED_RADIOTAP
|
|
|
|
DRV_OBJS += ../src/utils/radiotap.o
|
|
|
|
endif
|
|
|
|
|
2012-08-10 11:55:33 +02:00
|
|
|
ifdef CONFIG_FULL_DYNAMIC_VLAN
|
2019-10-07 23:08:32 +02:00
|
|
|
NEED_LINUX_IOCTL=y
|
|
|
|
ifdef CONFIG_VLAN_NETLINK
|
2018-09-14 11:17:29 +02:00
|
|
|
NEED_LIBNL=y
|
|
|
|
CONFIG_LIBNL3_ROUTE=y
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2019-10-07 23:08:32 +02:00
|
|
|
ifdef NEED_LINUX_IOCTL
|
|
|
|
DRV_OBJS += ../src/drivers/linux_ioctl.o
|
|
|
|
endif
|
|
|
|
|
2018-09-14 11:17:29 +02:00
|
|
|
ifdef NEED_LIBNL
|
2019-01-08 12:31:55 +01:00
|
|
|
ifndef CONFIG_LIBNL32
|
|
|
|
ifndef CONFIG_LIBNL20
|
|
|
|
ifndef CONFIG_LIBNL_TINY
|
|
|
|
PKG_CONFIG ?= pkg-config
|
|
|
|
HAVE_LIBNL3 := $(shell $(PKG_CONFIG) --exists libnl-3.0; echo $$?)
|
|
|
|
ifeq ($(HAVE_LIBNL3),0)
|
|
|
|
CONFIG_LIBNL32=y
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2012-08-10 11:55:33 +02:00
|
|
|
ifdef CONFIG_LIBNL32
|
|
|
|
DRV_LIBS += -lnl-3
|
|
|
|
DRV_LIBS += -lnl-genl-3
|
2018-09-14 11:17:29 +02:00
|
|
|
ifdef LIBNL_INC
|
|
|
|
DRV_CFLAGS += -I$(LIBNL_INC)
|
|
|
|
else
|
|
|
|
PKG_CONFIG ?= pkg-config
|
|
|
|
DRV_CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-3.0)
|
|
|
|
endif
|
|
|
|
ifdef CONFIG_LIBNL3_ROUTE
|
|
|
|
DRV_LIBS += -lnl-route-3
|
|
|
|
DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE
|
|
|
|
endif
|
2012-08-10 11:55:33 +02:00
|
|
|
else
|
|
|
|
ifdef CONFIG_LIBNL_TINY
|
|
|
|
DRV_LIBS += -lnl-tiny
|
|
|
|
else
|
2018-09-14 11:17:29 +02:00
|
|
|
ifndef CONFIG_OSX
|
|
|
|
DRV_LIBS += -lnl
|
|
|
|
DRV_LIBS += -lnl-genl
|
|
|
|
endif
|
2012-08-10 11:55:33 +02:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2010-01-03 21:08:26 +01:00
|
|
|
|
2009-08-14 18:53:27 +02:00
|
|
|
##### COMMON VARS
|
|
|
|
DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS)
|
|
|
|
DRV_WPA_CFLAGS += $(DRV_CFLAGS)
|
|
|
|
DRV_AP_CFLAGS += $(DRV_CFLAGS)
|
|
|
|
|
|
|
|
DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS)
|
|
|
|
DRV_WPA_LIBS += $(DRV_LIBS)
|
|
|
|
DRV_AP_LIBS += $(DRV_LIBS)
|
|
|
|
|
|
|
|
DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS)
|
|
|
|
DRV_WPA_OBJS += $(DRV_OBJS)
|
|
|
|
DRV_AP_OBJS += $(DRV_OBJS)
|
|
|
|
|
|
|
|
DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS)
|
|
|
|
DRV_WPA_LDFLAGS += $(DRV_LDFLAGS)
|
|
|
|
DRV_AP_LDFLAGS += $(DRV_LDFLAGS)
|