drivers.mak 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. ##### COMMON DRIVERS
  2. ifdef CONFIG_DRIVER_HOSTAP
  3. DRV_CFLAGS += -DCONFIG_DRIVER_HOSTAP
  4. DRV_OBJS += ../src/drivers/driver_hostap.o
  5. CONFIG_WIRELESS_EXTENSION=y
  6. NEED_AP_MLME=y
  7. NEED_NETLINK=y
  8. endif
  9. ifdef CONFIG_DRIVER_WIRED
  10. DRV_CFLAGS += -DCONFIG_DRIVER_WIRED
  11. DRV_OBJS += ../src/drivers/driver_wired.o
  12. endif
  13. ifdef CONFIG_DRIVER_MADWIFI
  14. DRV_CFLAGS += -DCONFIG_DRIVER_MADWIFI
  15. DRV_OBJS += ../src/drivers/driver_madwifi.o
  16. CONFIG_WIRELESS_EXTENSION=y
  17. CONFIG_L2_PACKET=linux
  18. NEED_NETLINK=y
  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/utils/radiotap.o
  24. NEED_SME=y
  25. NEED_AP_MLME=y
  26. NEED_NETLINK=y
  27. DRV_LIBS += -lnl
  28. ifdef CONFIG_LIBNL20
  29. DRV_LIBS += -lnl-genl
  30. DRV_CFLAGS += -DCONFIG_LIBNL20
  31. endif
  32. endif
  33. ifdef CONFIG_DRIVER_BSD
  34. ifndef CONFIG_L2_PACKET
  35. CONFIG_L2_PACKET=freebsd
  36. endif
  37. DRV_CFLAGS += -DCONFIG_DRIVER_BSD
  38. DRV_OBJS += ../src/drivers/driver_bsd.o
  39. CONFIG_L2_FREEBSD=y
  40. CONFIG_DNET_PCAP=y
  41. endif
  42. ifdef CONFIG_DRIVER_TEST
  43. DRV_CFLAGS += -DCONFIG_DRIVER_TEST
  44. DRV_OBJS += ../src/drivers/driver_test.o
  45. NEED_AP_MLME=y
  46. endif
  47. ifdef CONFIG_DRIVER_NONE
  48. DRV_CFLAGS += -DCONFIG_DRIVER_NONE
  49. DRV_OBJS += ../src/drivers/driver_none.o
  50. endif
  51. ##### PURE AP DRIVERS
  52. ifdef CONFIG_DRIVER_ATHEROS
  53. DRV_AP_CFLAGS += -DCONFIG_DRIVER_ATHEROS
  54. DRV_AP_OBJS += ../src/drivers/driver_atheros.o
  55. CONFIG_L2_PACKET=linux
  56. NEED_NETLINK=y
  57. endif
  58. ##### PURE CLIENT DRIVERS
  59. ifdef CONFIG_DRIVER_WEXT
  60. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
  61. CONFIG_WIRELESS_EXTENSION=y
  62. NEED_NETLINK=y
  63. endif
  64. ifdef CONFIG_DRIVER_HERMES
  65. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_HERMES
  66. DRV_WPA_OBJS += ../src/drivers/driver_hermes.o
  67. CONFIG_WIRELESS_EXTENSION=y
  68. endif
  69. ifdef CONFIG_DRIVER_ATMEL
  70. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ATMEL
  71. DRV_WPA_OBJS += ../src/drivers/driver_atmel.o
  72. CONFIG_WIRELESS_EXTENSION=y
  73. endif
  74. ifdef CONFIG_DRIVER_NDISWRAPPER
  75. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDISWRAPPER
  76. DRV_WPA_OBJS += ../src/drivers/driver_ndiswrapper.o
  77. CONFIG_WIRELESS_EXTENSION=y
  78. endif
  79. ifdef CONFIG_DRIVER_RALINK
  80. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_RALINK
  81. DRV_WPA_OBJS += ../src/drivers/driver_ralink.o
  82. NEED_NETLINK=y
  83. endif
  84. ifdef CONFIG_DRIVER_BROADCOM
  85. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_BROADCOM
  86. DRV_WPA_OBJS += ../src/drivers/driver_broadcom.o
  87. endif
  88. ifdef CONFIG_DRIVER_IPW
  89. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_IPW
  90. DRV_WPA_OBJS += ../src/drivers/driver_ipw.o
  91. CONFIG_WIRELESS_EXTENSION=y
  92. endif
  93. ifdef CONFIG_DRIVER_NDIS
  94. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS
  95. DRV_WPA_OBJS += ../src/drivers/driver_ndis.o
  96. ifdef CONFIG_NDIS_EVENTS_INTEGRATED
  97. DRV_WPA_OBJS += ../src/drivers/driver_ndis_.o
  98. endif
  99. ifndef CONFIG_L2_PACKET
  100. CONFIG_L2_PACKET=pcap
  101. endif
  102. CONFIG_WINPCAP=y
  103. ifdef CONFIG_USE_NDISUIO
  104. DRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO
  105. endif
  106. endif
  107. ifdef CONFIG_DRIVER_OSX
  108. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_OSX
  109. DRV_WPA_OBJS += ../src/drivers/driver_osx.o
  110. DRV_WPA_LDFLAGS += -framework CoreFoundation
  111. DRV_WPA_LDFLAGS += -F/System/Library/PrivateFrameworks -framework Apple80211
  112. endif
  113. ifdef CONFIG_DRIVER_PS3
  114. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_PS3 -m64
  115. DRV_WPA_OBJS += ../src/drivers/driver_ps3.o
  116. DRV_WPA_LDFLAGS += -m64
  117. endif
  118. ifdef CONFIG_DRIVER_IPHONE
  119. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_IPHONE
  120. DRV_WPA_OBJS += ../src/drivers/driver_iphone.o
  121. DRV_WPA_OBJS += ../src/drivers/MobileApple80211.o
  122. DRV_WPA_LDFLAGS += -framework CoreFoundation
  123. endif
  124. ifdef CONFIG_DRIVER_ROBOSWITCH
  125. DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH
  126. DRV_WPA_OBJS += ../src/drivers/driver_roboswitch.o
  127. endif
  128. ifdef CONFIG_WIRELESS_EXTENSION
  129. DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
  130. DRV_WPA_OBJS += ../src/drivers/driver_wext.o
  131. endif
  132. ifdef NEED_NETLINK
  133. DRV_OBJS += ../src/drivers/netlink.o
  134. endif
  135. ##### COMMON VARS
  136. DRV_BOTH_CFLAGS := $(DRV_CFLAGS) $(DRV_WPA_CFLAGS) $(DRV_AP_CFLAGS)
  137. DRV_WPA_CFLAGS += $(DRV_CFLAGS)
  138. DRV_AP_CFLAGS += $(DRV_CFLAGS)
  139. DRV_BOTH_LIBS := $(DRV_LIBS) $(DRV_WPA_LIBS) $(DRV_AP_LIBS)
  140. DRV_WPA_LIBS += $(DRV_LIBS)
  141. DRV_AP_LIBS += $(DRV_LIBS)
  142. DRV_BOTH_OBJS := $(DRV_OBJS) $(DRV_WPA_OBJS) $(DRV_AP_OBJS)
  143. DRV_WPA_OBJS += $(DRV_OBJS)
  144. DRV_AP_OBJS += $(DRV_OBJS)
  145. DRV_BOTH_LDFLAGS := $(DRV_LDFLAGS) $(DRV_WPA_LDFLAGS) $(DRV_AP_LDFLAGS)
  146. DRV_WPA_LDFLAGS += $(DRV_LDFLAGS)
  147. DRV_AP_LDFLAGS += $(DRV_LDFLAGS)