Kbuild 2.7 KB

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