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