Kbuild 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. ifeq ($(obj),)
  2. obj := .
  3. endif
  4. DEPTH := ../..
  5. ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
  6. export QCA_PARTNER_MAKE_F_INC=1
  7. endif
  8. include $(obj)/$(DEPTH)/os/linux/Makefile-linux.common
  9. INCS += -I$(HAL) -I$(HAL)/$(OS) -I$(ATH) -I$(ATH_RATE) -I$(ATH_PKTLOG) -I$(WLAN) -I$(IF_WLAN) -I$(ATH_SPECTRAL) -I$(ATHEROSPATH) -I$(obj)/$(DEPTH)/../../apps/spectral/common
  10. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/inc -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/obj_mgr/inc
  11. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/cmn_defs/inc
  12. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/scan/dispatcher/inc
  13. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/cmn_defs/inc
  14. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/global_umac_dispatcher/lmac_if/inc
  15. INCS += -I$(obj)/$(DEPTH)/cmn_dev/scheduler/inc
  16. INCS += -I$(obj)/$(DEPTH)/cmn_dev/global_lmac_if/inc
  17. INCS += -I$(obj)/$(DEPTH)/umac/scan
  18. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/mgmt_txrx/dispatcher/inc
  19. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/regulatory/dispatcher/inc
  20. INCS += -I$(obj)/$(DEPTH)/umac/son/dispatcher/inc
  21. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/dfs/dispatcher/inc
  22. ifeq ($(WLAN_CONV_CRYPTO_SUPPORTED), 1)
  23. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/crypto/inc
  24. endif
  25. #Start of offload related deifines
  26. HOST_CMN_CONVG_SRC := $(DEPTH)/cmn_dev
  27. HOST_CMN_CONVG_HIF_SRC := $(DEPTH)/cmn_dev/hif/src
  28. HOST_CMN_CONVG_HIF_INC1 := $(DEPTH)/cmn_dev/hif
  29. HOST_CMN_CONVG_HTC_INC := $(DEPTH)/cmn_dev/htc
  30. HOST_CMN_CONVG_DP_INC := $(DEPTH)/cmn_dev/dp/wifi3.0
  31. HOST_CMN_CONVG_CFG_INC := $(DEPTH)/cmn_dev/wlan_cfg
  32. HOST_CMN_CONVG_HAL_INC := $(DEPTH)/cmn_dev/hal/inc
  33. HOST_CMN_CONVG_HAL_WIFI_INC := $(DEPTH)/cmn_dev/hal/wifi3.0
  34. INCS += -I$(obj)/$(DEPTH)/include -I$(obj)/$(DEPTH)/umac/include \
  35. -I$(obj)/$(DEPTH)/umac/if_lmac -I$(obj)/$(DEPTH)/umac/crypto \
  36. -I$(obj)/$(DEPTH)/umac/scan -I$(obj)/$(DEPTH)/umac/resmgr \
  37. -I$(obj)/$(DEPTH)/umac/pm -I$(obj)/$(DEPTH)/umac/txrx \
  38. -I$(obj)/$(DEPTH)/umac/acs -I$(obj)/$(DEPTH)/umac/txbf \
  39. -I$(obj)/$(DEPTH)/umac/wnm \
  40. -I$(obj)/$(DEPTH)/umac/tdls \
  41. -I$(obj)/$(DEPTH)/umac/rpt_placement \
  42. -I$(obj)/$(DEPTH)/umac/wifipos \
  43. -I$(obj)/$(DEPTH)/umac/wds -I$(obj)/$(DEPTH)/umac/ique \
  44. -I$(obj)/$(DEPTH)/hal -I$(obj)/$(DEPTH)/lmac/ath_dev \
  45. -I$(obj)/$(DEPTH)/hal/$(OS) \
  46. -I$(obj)/$(DEPTH)/umac/vi_dbg \
  47. -I$(obj)/$(DEPTH)/umac/smart_antenna \
  48. -I$(obj)/$(DEPTH)/umac/smart_ant \
  49. -I$(obj)/$(DEPTH)/umac/ald \
  50. -I$(obj)/$(DEPTH)/lmac/ath_pktlog \
  51. -I$(obj)/$(DEPTH)/lmac/ratectrl \
  52. -I$(obj)/$(DEPTH)/os/linux/mem/ \
  53. -I$(obj)/$(DEPTH)/umac/base \
  54. -I$(obj)/$(DEPTH)/qca_ol \
  55. -I$(obj)/$(DEPTH)/cmn_dev/qdf/inc \
  56. -I$(obj)/$(DEPTH)/cmn_dev/qdf/linux/src \
  57. -I$(obj)/$(DEPTH)/cmn_dev/hif \
  58. -I$(obj)/$(DEPTH)/cmn_dev/hif/inc \
  59. -I$(obj)/$(DEPTH)/cmn_dev/hif/src \
  60. -I$(obj)/$(DEPTH)/cmn_dev/hif/src/ce \
  61. -I$(obj)/$(DEPTH)/cmn_dev/hif/src/pcie \
  62. -I$(obj)/$(DEPTH)/cmn_dev/hif/src/snoc \
  63. -I$(obj)/$(DEPTH)/cmn_dev/hif/src/dispatcher \
  64. -I$(obj)/$(DEPTH)/cmn_dev/pld_stub/inc \
  65. -I$(obj)/$(DEPTH)/cmn_dev/hal/inc \
  66. -I$(obj)/$(DEPTH)/cmn_dev/hal/wifi3.0 \
  67. -I$(obj)/$(DEPTH)/cmn_dev/dp/inc \
  68. -I$(obj)/$(DEPTH)/cmn_dev/dp/wifi3.0 \
  69. -I$(obj)/$(DEPTH)/cmn_dev/wlan_cfg \
  70. -I$(obj)/$(HOST_CMN_CONVG_SRC)/htc \
  71. -I$(obj)/$(DEPTH)/cmn_dev/wmi/inc \
  72. -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/obj_mgr/inc \
  73. -I$(obj)/$(HOST_CMN_CONVG_SRC)/scheduler/inc \
  74. -I$(obj)/$(HOST_CMN_CONVG_SRC)/init_deinit/dispatcher/inc \
  75. -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/inc \
  76. -I$(obj)/$(DEPTH)/cmn_dev/umac/global_umac_dispatcher/lmac_if/inc \
  77. -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/mgmt_txrx/dispatcher/inc \
  78. -I$(obj)/$(DEPTH)/cmn_dev/target_if/init_deinit/inc \
  79. -I$(obj)/$(DEPTH)/cmn_dev/global_lmac_if/inc \
  80. -I$(obj)/$(DEPTH)/cmn_dev/os_if/linux \
  81. -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/cmn_defs/inc \
  82. -I$(obj)/$(DEPTH)/cmn_dev/target_if/core/inc \
  83. -I$(obj)/$(DEPTH)/cmn_dev/umac/scan/dispatcher/inc \
  84. -I$(obj)/$(DEPTH)/umac/scan \
  85. -I$(obj)/$(DEPTH)/cmn_dev/ol_if \
  86. -I$(obj)/$(DEPTH)/cmn_dev/target_if/scan/inc \
  87. -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/serialization/core/inc \
  88. -I$(obj)/$(DEPTH)/cmn_dev/umac/regulatory/dispatcher/inc \
  89. -I$(obj)/$(DEPTH)/cmn_dev/target_if/regulatory/inc \
  90. PERF_PWR_OFFLOAD_INC += -I$(PERF_PWR_OFFLOAD_DIR_PATH)/wlan/include \
  91. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/wlan/ath_pktlog/include \
  92. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/htt/include \
  93. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/wlan/txrx/include \
  94. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/include \
  95. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/include \
  96. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/hif/pci \
  97. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/hif/pci/linux \
  98. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/os/linux/include \
  99. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/wlan/regdmn \
  100. -I$(PERF_PWR_OFFLOAD_DIR_PATH)/wlan/lmac_offload_if \
  101. -I$(HOST_CMN_CONVG_HIF_INC1)/inc \
  102. -I$(HOST_CMN_CONVG_HIF_INC1)/src \
  103. -I$(HOST_CMN_CONVG_HIF_INC1)/src/pcie \
  104. -I$(HOST_CMN_CONVG_HIF_INC1)/src/snoc \
  105. -I$(HOST_CMN_CONVG_SRC)/pld_stub/inc \
  106. -I$(HOST_CMN_CONVG_HIF_SRC)/ce \
  107. -I$(HOST_CMN_CONVG_HTC_INC) \
  108. -I$(HOST_CMN_CONVG_CFG_INC) \
  109. -I$(HOST_CMN_CONVG_DP_INC) \
  110. -I$(HOST_CMN_CONVG_HAL_INC) \
  111. -I$(HOST_CMN_CONVG_HAL_WIFI_INC) \
  112. -I$(PERF_PWR_OFFLOAD_WMI_SRC)/inc \
  113. -I$(obj)/$(DEPTH)/offload/extra_include
  114. INCS += $(PERF_PWR_OFFLOAD_INC)
  115. INCS += -I$(obj)/$(DEPTH)/cmn_dev/target_if/spectral
  116. INCS += -I$(obj)/$(DEPTH)/cmn_dev/wmi/inc
  117. INCS += -I$(PERF_PWR_OFFLOAD_DIR_PATH)/hw/include
  118. #end of offload related defines
  119. #Start of Legacy spectral related defines
  120. INCS += -I$(HAL) -I$(HAL)/$(OS) -I$(ATH) -I$(ATH_RATE) -I$(ATH_PKTLOG) -I$(WLAN) -I$(IF_WLAN) -I$(ATH_SPECTRAL) -I$(ATHEROSPATH) -I$(obj)/$(DEPTH)/../../apps/spectral/common
  121. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/inc -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/obj_mgr/inc
  122. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/cmn_defs/inc
  123. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/scan/dispatcher/inc
  124. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/cmn_defs/inc
  125. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/global_umac_dispatcher/lmac_if/inc
  126. INCS += -I$(obj)/$(DEPTH)/cmn_dev/scheduler/inc
  127. INCS += -I$(obj)/$(DEPTH)/umac/scan
  128. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/mgmt_txrx/dispatcher/inc
  129. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/regulatory/dispatcher/inc
  130. INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/dfs/dispatcher/inc
  131. SPECTRAL_DA_OBJS := $(DEPTH)/lmac/spectral/spectral.o \
  132. $(DEPTH)/lmac/spectral/spectral_netlink.o \
  133. $(DEPTH)/lmac/spectral/spectral_cmds.o \
  134. $(DEPTH)/lmac/spectral/spectral_process_data.o \
  135. $(DEPTH)/lmac/spectral/spectral_phyerr.o
  136. #End of legacy spectral defines
  137. ifeq ($(QCA_AIRTIME_FAIRNESS), 1)
  138. ccflags-y+= -DWLAN_ATF_ENABLE
  139. INCS += -I$(obj)/$(DEPTH)/umac/airtime_fairness/dispatcher/inc
  140. endif
  141. ifeq ($(UNIFIED_SMARTANTENNA), 1)
  142. ccflags-y+= -DWLAN_SA_API_ENABLE
  143. INCS += -I$(obj)/$(DEPTH)/umac/sa_api/dispatcher/inc
  144. endif
  145. ifeq ($(strip ${QCA_DFS_COMPONENT_ENABLE}),1)
  146. ccflags-y+= -DDFS_COMPONENT_ENABLE
  147. endif
  148. obj-m += qca_spectral.o
  149. ccflags-y+= $(INCS) $(COPTS) -DSPECTRAL_USE_NETLINK_SOCKETS=1 -DWLAN_SPECTRAL_ENABLE=1
  150. ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
  151. MOD_CFLAGS = -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(qca_spectral.mod)" -D"KBUILD_MODNAME=KBUILD_STR(qca_spectral)"
  152. endif
  153. INCS += -I$(obj)/$(DEPTH)/spectral/dispatcher/inc
  154. SPECTRAL_TIF_OBJS += $(DEPTH)/cmn_dev/target_if/spectral/target_if_spectral.o \
  155. $(DEPTH)/cmn_dev/target_if/spectral/target_if_spectral_netlink.o \
  156. $(DEPTH)/cmn_dev/target_if/spectral/target_if_spectral_phyerr.o \
  157. $(DEPTH)/cmn_dev/target_if/spectral/target_if_spectral_sim.o
  158. SPECTRAL_CMN_OBJS += core/spectral_direct_attach.o \
  159. core/spectral_offload.o \
  160. core/spectral_common.o \
  161. dispatcher/src/wlan_spectral_utils_api.o \
  162. dispatcher/src/wlan_spectral_ucfg_api.o \
  163. dispatcher/src/wlan_spectral_tgt_api.o \
  164. core/spectral_module.o
  165. qca_spectral-objs += ${SPECTRAL_CMN_OBJS} \
  166. ${SPECTRAL_TIF_OBJS} \
  167. ${SPECTRAL_DA_OBJS}
  168. ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
  169. all: qca_spectral.ko
  170. qca_spectral.mod.o: qca_spectral.mod.c
  171. ${CC} -c -o $@ ${ccflags-y} ${MOD_CFLAGS} $<
  172. qca_spectral.o: ${qca_spectral-objs}
  173. $(LD) -m elf32btsmip -r -o qca_spectral.o $(qca_spectral-objs)
  174. $(KERNELPATH)/scripts/mod/modpost qca_spectral.o
  175. qca_spectral.ko: qca_spectral.o qca_spectral.mod.o
  176. $(LD) $(LDOPTS) -o qca_spectral.ko qca_spectral.o qca_spectral.mod.o
  177. %.o: %.c
  178. ${CC} -c -o $@ ${ccflags-y} $<
  179. endif