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