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