Kbuild 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. ifeq ($(obj),)
  2. obj := .
  3. endif
  4. DEPTH := ../..
  5. HOST_CMN_CONVG_SRC := $(DEPTH)/cmn_dev
  6. HOST_CMN_CONVG_NLINK := $(DEPTH)/cmn_dev/utils/nlink
  7. HOST_CMN_CONVG_LOGGING := $(DEPTH)/cmn_dev/utils/logging
  8. HOST_CMN_CONVG_PTT := $(DEPTH)/cmn_dev/utils/ptt
  9. HOST_QAL_SRC := $(DEPTH)/component_dev/qal
  10. include $(obj)/$(DEPTH)/os/linux/Makefile-linux.common
  11. INCS += -Iinclude/nbuf -Iinclude/net -Iinclude/os
  12. INCS += -Inbuf/linux -Inet/linux -Ios/linux
  13. INCS += -I$(WLAN_TOP)/../../include
  14. INCS += -I$(WLAN_TOP)/cmn_dev/qdf/inc
  15. INCS += -I$(WLAN_TOP)/cmn_dev/qal/inc
  16. INCS += -I$(WLAN_TOP)/cmn_dev/utils/sys
  17. INCS += -I$(WLAN_TOP)/component_dev/qal/inc
  18. INCS += -I$(WLAN_TOP)/cmn_dev/qal/linux/src
  19. INCS += -I$(WLAN_TOP)/cmn_dev/qdf/linux/src
  20. INCS += -I$(obj)/$(HOST_CMN_CONVG_PTT)/inc \
  21. -I$(obj)/$(HOST_CMN_CONVG_NLINK)/inc \
  22. -I$(obj)/$(HOST_CMN_CONVG_LOGGING)/inc \
  23. -I$(obj)/$(DEPTH)/cmn_dev/utils/host_diag_log/inc \
  24. -I$(obj)/$(DEPTH)/cmn_dev/utils/host_diag_log/src \
  25. -I$(obj)/$(DEPTH)/cmn_dev/utils/ptt/inc \
  26. -I$(WLAN_TOP)/pld/inc
  27. obj-m += qdf.o
  28. EXTRA_CFLAGS+= $(INCS) $(COPTS) -Wno-unused-function
  29. ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
  30. MOD_CFLAGS = -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(qdf.mod)" -D"KBUILD_MODNAME=KBUILD_STR(qdf)"
  31. endif
  32. qdf-objs := \
  33. linux/src/qdf_defer.o \
  34. linux/src/qdf_dev.o \
  35. linux/src/qdf_event.o \
  36. linux/src/qdf_file.o \
  37. linux/src/qdf_list.o \
  38. linux/src/qdf_lock.o \
  39. linux/src/qdf_mc_timer.o \
  40. linux/src/qdf_mem.o \
  41. linux/src/qdf_module.o \
  42. linux/src/qdf_net_if.o \
  43. linux/src/qdf_nbuf.o \
  44. linux/src/qdf_perf.o \
  45. linux/src/qdf_status.o \
  46. linux/src/qdf_threads.o \
  47. linux/src/qdf_trace.o \
  48. linux/src/qdf_vfs.o \
  49. src/qdf_flex_mem.o \
  50. src/qdf_parse.o \
  51. src/qdf_str.o \
  52. src/qdf_types.o \
  53. src/qdf_platform.o \
  54. $(HOST_CMN_CONVG_NLINK)/src/wlan_nlink_srv.o \
  55. $(HOST_QAL_SRC)/linux/src/qal_devcfg.o \
  56. $(HOST_QAL_SRC)/linux/src/qal_vbus_dev.o \
  57. $(HOST_QAL_SRC)/linux/src/qal_streamfs.o \
  58. $(HOST_QAL_SRC)/linux/src/qal_notifier.o \
  59. #linux/src/qdf_net.o \
  60. #linux/src/qdf_net_event.o \
  61. #linux/src/qdf_net_ioctl.o
  62. #linux/src/qdf_net_wext.o
  63. ifeq ($(MEMORY_DEBUG),1)
  64. qdf-objs += src/qdf_debug_domain.o
  65. endif
  66. ifeq ($(LOGGING_UTILS_SUPPORT),1)
  67. qdf-objs += \
  68. $(HOST_CMN_CONVG_LOGGING)/src/wlan_logging_sock_svc.o
  69. endif
  70. ifeq ($(WLAN_DEBUGFS),1)
  71. qdf-objs += linux/src/qdf_debugfs.o
  72. endif
  73. ifeq ($(BUILD_ADF_NET_IOCTL),1)
  74. EXTRA_CFLAGS+= -DADF_NET_IOCTL_SUPPORT
  75. #adf-objs += os/linux/adf_os_netlink_pvt.o \
  76. # net/linux/adf_net_event.o \
  77. # net/linux/adf_net_wext.o \
  78. # net/linux/adf_net_ioctl.o
  79. endif
  80. ifeq ($(BUILD_ADF_DEFER_PVT),1)
  81. #adf-objs += os/linux/adf_os_defer_pvt.o
  82. endif
  83. ifeq ($(BUILD_ADF_IRQ_PVT),1)
  84. #adf-objs += os/linux/adf_os_irq_pvt.o
  85. endif
  86. ifeq ($(BUILD_ADF_PERF_PROFILING),1)
  87. #adf-objs += os/linux/adf_os_perf_pvt.o
  88. ifeq ($(BUILD_ADF_MIPS_PERF_PROFILING),1)
  89. #adf-objs += os/linux/adf_os_mips_perf_pvt.o
  90. endif
  91. endif
  92. # os/linux/adf_os_pci_pvt.o \
  93. # net/linux/adf_net_ioctl.o \
  94. # net/linux/adf_net_pseudo.o \
  95. clean-files := modules.order
  96. ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
  97. all: qdf.ko
  98. qdf.mod.o: qdf.mod.c
  99. ${CC} -c -o $@ ${EXTRA_CFLAGS} ${MOD_CFLAGS} $<
  100. adf.o: ${adf-objs}
  101. $(LD) -m elf32btsmip -r -o adf.o $(adf-objs)
  102. $(KERNELPATH)/scripts/mod/modpost qdf.o
  103. qdf.ko: qdf.o qdf.mod.o
  104. $(LD) $(LDOPTS) -o qdf.ko qdf.o qdf.mod.o
  105. %.o: %.c
  106. ${CC} -c -o $@ ${EXTRA_CFLAGS} $<
  107. endif