1ifeq ($(obj),) 2obj := . 3endif 4 5DEPTH := ../.. 6 7HOST_CMN_CONVG_SRC := $(DEPTH)/cmn_dev 8HOST_CMN_CONVG_NLINK := $(DEPTH)/cmn_dev/utils/nlink 9HOST_CMN_CONVG_LOGGING := $(DEPTH)/cmn_dev/utils/logging 10HOST_CMN_CONVG_PTT := $(DEPTH)/cmn_dev/utils/ptt 11HOST_QAL_SRC := $(DEPTH)/component_dev/qal 12 13include $(obj)/$(DEPTH)/os/linux/Makefile-linux.common 14 15INCS += -Iinclude/nbuf -Iinclude/net -Iinclude/os 16INCS += -Inbuf/linux -Inet/linux -Ios/linux 17INCS += -I$(WLAN_TOP)/../../include 18INCS += -I$(WLAN_TOP)/cmn_dev/qdf/inc 19INCS += -I$(WLAN_TOP)/cmn_dev/qal/inc 20INCS += -I$(WLAN_TOP)/cmn_dev/utils/sys 21INCS += -I$(WLAN_TOP)/component_dev/qal/inc 22INCS += -I$(WLAN_TOP)/cmn_dev/qal/linux/src 23INCS += -I$(WLAN_TOP)/cmn_dev/qdf/linux/src 24INCS += -I$(obj)/$(HOST_CMN_CONVG_PTT)/inc \ 25 -I$(obj)/$(HOST_CMN_CONVG_NLINK)/inc \ 26 -I$(obj)/$(HOST_CMN_CONVG_LOGGING)/inc \ 27 -I$(obj)/$(DEPTH)/cmn_dev/utils/host_diag_log/inc \ 28 -I$(obj)/$(DEPTH)/cmn_dev/utils/host_diag_log/src \ 29 -I$(obj)/$(DEPTH)/cmn_dev/utils/ptt/inc \ 30 -I$(obj)/$(HOST_CMN_CONVG_SRC)/ipa/core/inc \ 31 -I$(obj)/$(HOST_CMN_CONVG_SRC)/ipa/core/src \ 32 -I$(obj)/$(HOST_CMN_CONVG_SRC)/ipa/dispatcher/inc \ 33 -I$(obj)/$(HOST_CMN_CONVG_SRC)/ipa/dispatcher/src \ 34 -I$(WLAN_TOP)/pld/inc 35 36obj-m += qdf.o 37 38inc_file := $(obj)/$(DEPTH)/qdf_inc_opts 39inc_var := $(shell echo $(INCS) > $(inc_file)) 40var := "@$(inc_file)" 41 42EXTRA_CFLAGS+= $(var) $(COPTS) -Wno-unused-function 43 44ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1) 45MOD_CFLAGS = -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(qdf.mod)" -D"KBUILD_MODNAME=KBUILD_STR(qdf)" 46endif 47 48qdf-objs := \ 49linux/src/qdf_defer.o \ 50linux/src/qdf_func_tracker.o \ 51linux/src/qdf_dev.o \ 52linux/src/qdf_event.o \ 53linux/src/qdf_file.o \ 54linux/src/qdf_list.o \ 55linux/src/qdf_lock.o \ 56linux/src/qdf_mc_timer.o \ 57linux/src/qdf_mem.o \ 58linux/src/qdf_crypto.o \ 59linux/src/qdf_module.o \ 60linux/src/qdf_net_if.o \ 61linux/src/qdf_nbuf.o \ 62linux/src/qdf_nbuf_frag.o \ 63linux/src/qdf_perf.o \ 64linux/src/qdf_status.o \ 65linux/src/qdf_threads.o \ 66linux/src/qdf_trace.o \ 67linux/src/qdf_vfs.o \ 68linux/src/qdf_delayed_work.o \ 69src/qdf_flex_mem.o \ 70src/qdf_parse.o \ 71src/qdf_str.o \ 72src/qdf_types.o \ 73src/qdf_platform.o \ 74$(HOST_CMN_CONVG_NLINK)/src/wlan_nlink_srv.o 75 76qal-objs := \ 77$(HOST_QAL_SRC)/linux/src/qal_devcfg.o \ 78$(HOST_QAL_SRC)/linux/src/qal_vbus_dev.o \ 79$(HOST_QAL_SRC)/linux/src/qal_notifier.o \ 80$(HOST_QAL_SRC)/linux/src/qal_devnode.o \ 81$(HOST_QAL_SRC)/linux/src/qal_bond.o 82ifeq ($(DBDC_REPEATER_SUPPORT),1) 83qal-objs += $(HOST_QAL_SRC)/linux/src/qal_bridge.o 84endif 85 86#linux/src/qdf_net.o \ 87#linux/src/qdf_net_event.o \ 88#linux/src/qdf_net_ioctl.o 89#linux/src/qdf_net_wext.o 90 91ifeq ($(IPA_OFFLOAD), 1) 92qdf-objs += linux/src/qdf_ipa.o 93endif 94 95ifeq ($(MEMORY_DEBUG),1) 96qdf-objs += src/qdf_debug_domain.o \ 97 src/qdf_tracker.o 98endif 99 100ifeq ($(LOGGING_UTILS_SUPPORT),1) 101qdf-objs += \ 102$(HOST_CMN_CONVG_LOGGING)/src/wlan_logging_sock_svc.o 103endif 104 105ifeq ($(WLAN_TRACEPOINTS),1) 106qdf-objs += linux/src/qdf_tracepoint.o 107endif 108 109ifeq ($(WLAN_DEBUGFS),1) 110qdf-objs += linux/src/qdf_debugfs.o 111endif 112 113ifeq ($(ENHANCED_OS_ABSTRACTION),1) 114qdf-objs += linux/src/qdf_hrtimer.o 115qdf-objs += linux/src/qdf_time.o 116endif 117 118ifeq ($(WLAN_STREAMFS),1) 119qdf-objs += linux/src/qdf_streamfs.o 120endif 121 122qdf-objs += $(qal-objs) 123 124ifeq ($(BUILD_ADF_NET_IOCTL),1) 125EXTRA_CFLAGS+= -DADF_NET_IOCTL_SUPPORT 126#adf-objs += os/linux/adf_os_netlink_pvt.o \ 127# net/linux/adf_net_event.o \ 128# net/linux/adf_net_wext.o \ 129# net/linux/adf_net_ioctl.o 130endif 131 132ifeq ($(BUILD_ADF_DEFER_PVT),1) 133#adf-objs += os/linux/adf_os_defer_pvt.o 134endif 135ifeq ($(BUILD_ADF_IRQ_PVT),1) 136#adf-objs += os/linux/adf_os_irq_pvt.o 137endif 138 139ifeq ($(BUILD_ADF_PERF_PROFILING),1) 140#adf-objs += os/linux/adf_os_perf_pvt.o 141ifeq ($(BUILD_ADF_MIPS_PERF_PROFILING),1) 142#adf-objs += os/linux/adf_os_mips_perf_pvt.o 143endif 144endif 145 146# os/linux/adf_os_pci_pvt.o \ 147# net/linux/adf_net_ioctl.o \ 148# net/linux/adf_net_pseudo.o \ 149 150clean-files := modules.order 151 152ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1) 153all: qdf.ko 154 155qdf.mod.o: qdf.mod.c 156 ${CC} -c -o $@ ${EXTRA_CFLAGS} ${MOD_CFLAGS} $< 157 158adf.o: ${adf-objs} 159 $(LD) -m elf32btsmip -r -o adf.o $(adf-objs) 160 $(KERNELPATH)/scripts/mod/modpost qdf.o 161 162qdf.ko: qdf.o qdf.mod.o 163 $(LD) $(LDOPTS) -o qdf.ko qdf.o qdf.mod.o 164 165%.o: %.c 166 ${CC} -c -o $@ ${EXTRA_CFLAGS} $< 167endif 168