drivers.mk revision 1.1.1.1
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_HOSTAP 16DRV_CFLAGS += -DCONFIG_DRIVER_HOSTAP 17DRV_OBJS += src/drivers/driver_hostap.c 18CONFIG_WIRELESS_EXTENSION=y 19NEED_AP_MLME=y 20NEED_NETLINK=y 21NEED_LINUX_IOCTL=y 22endif 23 24ifdef CONFIG_DRIVER_WIRED 25DRV_CFLAGS += -DCONFIG_DRIVER_WIRED 26DRV_OBJS += src/drivers/driver_wired.c 27endif 28 29ifdef CONFIG_DRIVER_MADWIFI 30DRV_CFLAGS += -DCONFIG_DRIVER_MADWIFI 31DRV_OBJS += src/drivers/driver_madwifi.c 32CONFIG_WIRELESS_EXTENSION=y 33CONFIG_L2_PACKET=linux 34NEED_NETLINK=y 35NEED_LINUX_IOCTL=y 36endif 37 38ifdef CONFIG_DRIVER_NL80211 39DRV_CFLAGS += -DCONFIG_DRIVER_NL80211 40DRV_OBJS += src/drivers/driver_nl80211.c 41DRV_OBJS += src/utils/radiotap.c 42NEED_SME=y 43NEED_AP_MLME=y 44NEED_NETLINK=y 45NEED_LINUX_IOCTL=y 46NEED_RFKILL=y 47 48ifdef CONFIG_LIBNL32 49 DRV_LIBS += -lnl-3 50 DRV_LIBS += -lnl-genl-3 51 DRV_CFLAGS += -DCONFIG_LIBNL20 52else 53 ifdef CONFIG_LIBNL_TINY 54 DRV_LIBS += -lnl-tiny 55 else 56 DRV_LIBS += -lnl 57 endif 58 59 ifdef CONFIG_LIBNL20 60 DRV_LIBS += -lnl-genl 61 DRV_CFLAGS += -DCONFIG_LIBNL20 62 endif 63endif 64endif 65 66ifdef CONFIG_DRIVER_BSD 67ifndef CONFIG_L2_PACKET 68CONFIG_L2_PACKET=freebsd 69endif 70DRV_CFLAGS += -DCONFIG_DRIVER_BSD 71DRV_OBJS += src/drivers/driver_bsd.c 72CONFIG_L2_FREEBSD=y 73CONFIG_DNET_PCAP=y 74endif 75 76ifdef CONFIG_DRIVER_TEST 77DRV_CFLAGS += -DCONFIG_DRIVER_TEST 78DRV_OBJS += src/drivers/driver_test.c 79NEED_AP_MLME=y 80endif 81 82ifdef CONFIG_DRIVER_NONE 83DRV_CFLAGS += -DCONFIG_DRIVER_NONE 84DRV_OBJS += src/drivers/driver_none.c 85endif 86 87##### PURE AP DRIVERS 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_RALINK 108DRV_WPA_CFLAGS += -DCONFIG_DRIVER_RALINK 109DRV_WPA_OBJS += src/drivers/driver_ralink.c 110NEED_NETLINK=y 111NEED_LINUX_IOCTL=y 112endif 113 114ifdef CONFIG_DRIVER_BROADCOM 115DRV_WPA_CFLAGS += -DCONFIG_DRIVER_BROADCOM 116DRV_WPA_OBJS += src/drivers/driver_broadcom.c 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_OSX 135DRV_WPA_CFLAGS += -DCONFIG_DRIVER_OSX 136DRV_WPA_OBJS += src/drivers/driver_osx.c 137DRV_WPA_LDFLAGS += -framework CoreFoundation 138DRV_WPA_LDFLAGS += -F/System/Library/PrivateFrameworks -framework Apple80211 139endif 140 141ifdef CONFIG_DRIVER_IPHONE 142DRV_WPA_CFLAGS += -DCONFIG_DRIVER_IPHONE 143DRV_WPA_OBJS += src/drivers/driver_iphone.c 144DRV_WPA_OBJS += src/drivers/MobileApple80211.c 145DRV_WPA_LDFLAGS += -framework CoreFoundation 146endif 147 148ifdef CONFIG_DRIVER_ROBOSWITCH 149DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH 150DRV_WPA_OBJS += src/drivers/driver_roboswitch.c 151endif 152 153ifdef CONFIG_WIRELESS_EXTENSION 154DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION 155DRV_WPA_OBJS += src/drivers/driver_wext.c 156NEED_RFKILL=y 157endif 158 159ifdef NEED_NETLINK 160DRV_OBJS += src/drivers/netlink.c 161endif 162 163ifdef NEED_LINUX_IOCTL 164DRV_OBJS += src/drivers/linux_ioctl.c 165endif 166 167ifdef NEED_RFKILL 168DRV_OBJS += src/drivers/rfkill.c 169endif 170 171ifdef CONFIG_DRIVER_CUSTOM 172DRV_CFLAGS += -DCONFIG_DRIVER_CUSTOM 173endif 174 175##### COMMON VARS 176DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS) 177DRV_WPA_CFLAGS += $(DRV_CFLAGS) 178DRV_AP_CFLAGS += $(DRV_CFLAGS) 179 180DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS) 181DRV_WPA_LIBS += $(DRV_LIBS) 182DRV_AP_LIBS += $(DRV_LIBS) 183 184DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS) 185DRV_WPA_OBJS += $(DRV_OBJS) 186DRV_AP_OBJS += $(DRV_OBJS) 187 188DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS) 189DRV_WPA_LDFLAGS += $(DRV_LDFLAGS) 190DRV_AP_LDFLAGS += $(DRV_LDFLAGS) 191