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