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