Kbuild 3.3 KB

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