drivers.mk revision 1.1.1.2
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 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.c 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.c 61NEED_AP_MLME=y 62endif 63 64ifdef CONFIG_DRIVER_NONE 65DRV_CFLAGS += -DCONFIG_DRIVER_NONE 66DRV_OBJS += src/drivers/driver_none.c 67endif 68 69##### PURE AP DRIVERS 70 71ifdef CONFIG_DRIVER_HOSTAP 72DRV_AP_CFLAGS += -DCONFIG_DRIVER_HOSTAP 73DRV_AP_OBJS += src/drivers/driver_hostap.c 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.c 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.c 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.c 110ifdef CONFIG_NDIS_EVENTS_INTEGRATED 111DRV_WPA_OBJS += src/drivers/driver_ndis_.c 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.c 125endif 126 127ifdef CONFIG_WIRELESS_EXTENSION 128DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION 129DRV_WPA_OBJS += src/drivers/driver_wext.c 130NEED_RFKILL=y 131endif 132 133ifdef NEED_NETLINK 134DRV_OBJS += src/drivers/netlink.c 135endif 136 137ifdef NEED_LINUX_IOCTL 138DRV_OBJS += src/drivers/linux_ioctl.c 139endif 140 141ifdef NEED_RFKILL 142DRV_OBJS += src/drivers/rfkill.c 143endif 144 145ifdef CONFIG_DRIVER_CUSTOM 146DRV_CFLAGS += -DCONFIG_DRIVER_CUSTOM 147endif 148 149ifdef CONFIG_VLAN_NETLINK 150ifdef CONFIG_FULL_DYNAMIC_VLAN 151ifdef CONFIG_LIBNL32 152 DRV_LIBS += -lnl-3 153 DRV_LIBS += -lnl-genl-3 154 DRV_LIBS += -lnl-route-3 155 DRV_CFLAGS += -DCONFIG_LIBNL20 156else 157 ifdef CONFIG_LIBNL_TINY 158 DRV_LIBS += -lnl-tiny 159 else 160 DRV_LIBS += -lnl 161 endif 162 163 ifdef CONFIG_LIBNL20 164 DRV_LIBS += -lnl-genl 165 DRV_LIBS += -lnl-route 166 DRV_CFLAGS += -DCONFIG_LIBNL20 167 endif 168endif 169endif 170endif 171 172##### COMMON VARS 173DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS) 174DRV_WPA_CFLAGS += $(DRV_CFLAGS) 175DRV_AP_CFLAGS += $(DRV_CFLAGS) 176 177DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS) 178DRV_WPA_LIBS += $(DRV_LIBS) 179DRV_AP_LIBS += $(DRV_LIBS) 180 181DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS) 182DRV_WPA_OBJS += $(DRV_OBJS) 183DRV_AP_OBJS += $(DRV_OBJS) 184 185DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS) 186DRV_WPA_LDFLAGS += $(DRV_LDFLAGS) 187DRV_AP_LDFLAGS += $(DRV_LDFLAGS) 188