drivers.mak 4.2 KB

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