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