1##### COMMON DRIVERS 2 3ifdef CONFIG_DRIVER_HOSTAP 4DRV_CFLAGS += -DCONFIG_DRIVER_HOSTAP 5DRV_OBJS += ../src/drivers/driver_hostap.o 6CONFIG_WIRELESS_EXTENSION=y 7NEED_AP_MLME=y 8NEED_NETLINK=y 9NEED_LINUX_IOCTL=y 10endif 11 12ifdef CONFIG_DRIVER_WIRED 13DRV_CFLAGS += -DCONFIG_DRIVER_WIRED 14DRV_OBJS += ../src/drivers/driver_wired.o 15endif 16 17ifdef CONFIG_DRIVER_MADWIFI 18DRV_CFLAGS += -DCONFIG_DRIVER_MADWIFI 19DRV_OBJS += ../src/drivers/driver_madwifi.o 20CONFIG_WIRELESS_EXTENSION=y 21CONFIG_L2_PACKET=linux 22NEED_NETLINK=y 23NEED_LINUX_IOCTL=y 24endif 25 26ifdef CONFIG_DRIVER_NL80211 27DRV_CFLAGS += -DCONFIG_DRIVER_NL80211 28DRV_OBJS += ../src/drivers/driver_nl80211.o 29DRV_OBJS += ../src/utils/radiotap.o 30NEED_SME=y 31NEED_AP_MLME=y 32NEED_NETLINK=y 33NEED_LINUX_IOCTL=y 34DRV_LIBS += -lnl 35 36ifdef CONFIG_LIBNL20 37DRV_LIBS += -lnl-genl 38DRV_CFLAGS += -DCONFIG_LIBNL20 39endif 40endif 41 42ifdef CONFIG_DRIVER_BSD 43ifndef CONFIG_L2_PACKET 44CONFIG_L2_PACKET=freebsd 45endif 46DRV_CFLAGS += -DCONFIG_DRIVER_BSD 47DRV_OBJS += ../src/drivers/driver_bsd.o 48CONFIG_L2_FREEBSD=y 49CONFIG_DNET_PCAP=y 50endif 51 52ifdef CONFIG_DRIVER_TEST 53DRV_CFLAGS += -DCONFIG_DRIVER_TEST 54DRV_OBJS += ../src/drivers/driver_test.o 55NEED_AP_MLME=y 56endif 57 58ifdef CONFIG_DRIVER_NONE 59DRV_CFLAGS += -DCONFIG_DRIVER_NONE 60DRV_OBJS += ../src/drivers/driver_none.o 61endif 62 63##### PURE AP DRIVERS 64 65ifdef CONFIG_DRIVER_ATHEROS 66DRV_AP_CFLAGS += -DCONFIG_DRIVER_ATHEROS 67DRV_AP_OBJS += ../src/drivers/driver_atheros.o 68CONFIG_L2_PACKET=linux 69NEED_NETLINK=y 70NEED_LINUX_IOCTL=y 71endif 72 73##### PURE CLIENT DRIVERS 74 75ifdef CONFIG_DRIVER_WEXT 76DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT 77CONFIG_WIRELESS_EXTENSION=y 78NEED_NETLINK=y 79NEED_LINUX_IOCTL=y 80endif 81 82ifdef CONFIG_DRIVER_HERMES 83DRV_WPA_CFLAGS += -DCONFIG_DRIVER_HERMES 84DRV_WPA_OBJS += ../src/drivers/driver_hermes.o 85CONFIG_WIRELESS_EXTENSION=y 86endif 87 88ifdef CONFIG_DRIVER_ATMEL 89DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ATMEL 90DRV_WPA_OBJS += ../src/drivers/driver_atmel.o 91CONFIG_WIRELESS_EXTENSION=y 92endif 93 94ifdef CONFIG_DRIVER_NDISWRAPPER 95DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDISWRAPPER 96DRV_WPA_OBJS += ../src/drivers/driver_ndiswrapper.o 97CONFIG_WIRELESS_EXTENSION=y 98endif 99 100ifdef CONFIG_DRIVER_RALINK 101DRV_WPA_CFLAGS += -DCONFIG_DRIVER_RALINK 102DRV_WPA_OBJS += ../src/drivers/driver_ralink.o 103NEED_NETLINK=y 104NEED_LINUX_IOCTL=y 105endif 106 107ifdef CONFIG_DRIVER_BROADCOM 108DRV_WPA_CFLAGS += -DCONFIG_DRIVER_BROADCOM 109DRV_WPA_OBJS += ../src/drivers/driver_broadcom.o 110endif 111 112ifdef CONFIG_DRIVER_IPW 113DRV_WPA_CFLAGS += -DCONFIG_DRIVER_IPW 114DRV_WPA_OBJS += ../src/drivers/driver_ipw.o 115CONFIG_WIRELESS_EXTENSION=y 116endif 117 118ifdef CONFIG_DRIVER_NDIS 119DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS 120DRV_WPA_OBJS += ../src/drivers/driver_ndis.o 121ifdef CONFIG_NDIS_EVENTS_INTEGRATED 122DRV_WPA_OBJS += ../src/drivers/driver_ndis_.o 123endif 124ifndef CONFIG_L2_PACKET 125CONFIG_L2_PACKET=pcap 126endif 127CONFIG_WINPCAP=y 128ifdef CONFIG_USE_NDISUIO 129DRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO 130endif 131endif 132 133ifdef CONFIG_DRIVER_OSX 134DRV_WPA_CFLAGS += -DCONFIG_DRIVER_OSX 135DRV_WPA_OBJS += ../src/drivers/driver_osx.o 136DRV_WPA_LDFLAGS += -framework CoreFoundation 137DRV_WPA_LDFLAGS += -F/System/Library/PrivateFrameworks -framework Apple80211 138endif 139 140ifdef CONFIG_DRIVER_IPHONE 141DRV_WPA_CFLAGS += -DCONFIG_DRIVER_IPHONE 142DRV_WPA_OBJS += ../src/drivers/driver_iphone.o 143DRV_WPA_OBJS += ../src/drivers/MobileApple80211.o 144DRV_WPA_LDFLAGS += -framework CoreFoundation 145endif 146 147ifdef CONFIG_DRIVER_ROBOSWITCH 148DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH 149DRV_WPA_OBJS += ../src/drivers/driver_roboswitch.o 150endif 151 152ifdef CONFIG_WIRELESS_EXTENSION 153DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION 154DRV_WPA_OBJS += ../src/drivers/driver_wext.o 155endif 156 157ifdef NEED_NETLINK 158DRV_OBJS += ../src/drivers/netlink.o 159endif 160 161ifdef NEED_LINUX_IOCTL 162DRV_OBJS += ../src/drivers/linux_ioctl.o 163endif 164 165 166##### COMMON VARS 167DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS) 168DRV_WPA_CFLAGS += $(DRV_CFLAGS) 169DRV_AP_CFLAGS += $(DRV_CFLAGS) 170 171DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS) 172DRV_WPA_LIBS += $(DRV_LIBS) 173DRV_AP_LIBS += $(DRV_LIBS) 174 175DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS) 176DRV_WPA_OBJS += $(DRV_OBJS) 177DRV_AP_OBJS += $(DRV_OBJS) 178 179DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS) 180DRV_WPA_LDFLAGS += $(DRV_LDFLAGS) 181DRV_AP_LDFLAGS += $(DRV_LDFLAGS) 182