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