Kbuild 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 ($(BUILD_ADF_NET_IOCTL),1)
  49. EXTRA_CFLAGS+= -DADF_NET_IOCTL_SUPPORT
  50. #adf-objs += os/linux/adf_os_netlink_pvt.o \
  51. # net/linux/adf_net_event.o \
  52. # net/linux/adf_net_wext.o \
  53. # net/linux/adf_net_ioctl.o
  54. endif
  55. ifeq ($(BUILD_ADF_DEFER_PVT),1)
  56. #adf-objs += os/linux/adf_os_defer_pvt.o
  57. endif
  58. ifeq ($(BUILD_ADF_IRQ_PVT),1)
  59. #adf-objs += os/linux/adf_os_irq_pvt.o
  60. endif
  61. ifeq ($(BUILD_ADF_PERF_PROFILING),1)
  62. #adf-objs += os/linux/adf_os_perf_pvt.o
  63. ifeq ($(BUILD_ADF_MIPS_PERF_PROFILING),1)
  64. #adf-objs += os/linux/adf_os_mips_perf_pvt.o
  65. endif
  66. endif
  67. # os/linux/adf_os_pci_pvt.o \
  68. # net/linux/adf_net_ioctl.o \
  69. # net/linux/adf_net_pseudo.o \
  70. clean-files := modules.order
  71. ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
  72. all: qdf.ko
  73. qdf.mod.o: qdf.mod.c
  74. ${CC} -c -o $@ ${EXTRA_CFLAGS} ${MOD_CFLAGS} $<
  75. adf.o: ${adf-objs}
  76. $(LD) -m elf32btsmip -r -o adf.o $(adf-objs)
  77. $(KERNELPATH)/scripts/mod/modpost qdf.o
  78. qdf.ko: qdf.o qdf.mod.o
  79. $(LD) $(LDOPTS) -o qdf.ko qdf.o qdf.mod.o
  80. %.o: %.c
  81. ${CC} -c -o $@ ${EXTRA_CFLAGS} $<
  82. endif