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