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