drivers.mak 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_HOSTAP 16DRV_CFLAGS += -DCONFIG_DRIVER_HOSTAP 17DRV_OBJS += ../src/drivers/driver_hostap.o 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.o 27endif 28 29ifdef CONFIG_DRIVER_MADWIFI 30DRV_CFLAGS += -DCONFIG_DRIVER_MADWIFI 31DRV_OBJS += ../src/drivers/driver_madwifi.o 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.o 41DRV_OBJS += ../src/utils/radiotap.o 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.o 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.o 79NEED_AP_MLME=y 80endif 81 82ifdef CONFIG_DRIVER_NONE 83DRV_CFLAGS += -DCONFIG_DRIVER_NONE 84DRV_OBJS += ../src/drivers/driver_none.o 85endif 86 87##### PURE AP DRIVERS 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_RALINK 108DRV_WPA_CFLAGS += -DCONFIG_DRIVER_RALINK 109DRV_WPA_OBJS += ../src/drivers/driver_ralink.o 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.o 117endif 118 119ifdef CONFIG_DRIVER_NDIS 120DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS 121DRV_WPA_OBJS += ../src/drivers/driver_ndis.o 122ifdef CONFIG_NDIS_EVENTS_INTEGRATED 123DRV_WPA_OBJS += ../src/drivers/driver_ndis_.o 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.o 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.o 144DRV_WPA_OBJS += ../src/drivers/MobileApple80211.o 145DRV_WPA_LDFLAGS += -framework CoreFoundation 146endif 147 148ifdef CONFIG_DRIVER_ROBOSWITCH 149DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH 150DRV_WPA_OBJS += ../src/drivers/driver_roboswitch.o 151endif 152 153ifdef CONFIG_WIRELESS_EXTENSION 154DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION 155DRV_WPA_OBJS += ../src/drivers/driver_wext.o 156NEED_RFKILL=y 157endif 158 159ifdef NEED_NETLINK 160DRV_OBJS += ../src/drivers/netlink.o 161endif 162 163ifdef NEED_LINUX_IOCTL 164DRV_OBJS += ../src/drivers/linux_ioctl.o 165endif 166 167ifdef NEED_RFKILL 168DRV_OBJS += ../src/drivers/rfkill.o 169endif 170 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