Kbuild 3.1 KB

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