xref: /wlan-driver/qca-wifi-host-cmn/iot_sim/Kbuild (revision 5113495b16420b49004c444715d2daae2066e7dc)
1ifeq ($(obj),)
2obj := .
3endif
4
5DEPTH := ../..
6
7include $(obj)/$(DEPTH)/os/linux/Makefile-linux.common
8
9INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/inc -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/obj_mgr/inc
10INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/cmn_defs/inc
11INCS += -I$(obj)/$(DEPTH)/cmn_dev/utils/nlink/inc
12INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/scan/dispatcher/inc
13INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/cmn_defs/inc
14INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/global_umac_dispatcher/lmac_if/inc
15INCS += -I$(obj)/$(DEPTH)/cmn_dev/scheduler/inc
16INCS += -I$(obj)/$(DEPTH)/cmn_dev/global_lmac_if/inc
17INCS += -I$(obj)/$(DEPTH)/umac/scan
18INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/mgmt_txrx/dispatcher/inc
19INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/regulatory/dispatcher/inc
20INCS += -I$(obj)/$(DEPTH)/umac/son/dispatcher/inc
21INCS += -I$(obj)/$(DEPTH)/umac/son/os/linux
22INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/regulatory/inc
23INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/dfs/dispatcher/inc
24INCS += -I$(obj)/$(DEPTH)/cmn_dev/os_if/linux/scan/inc
25INCS += -I$(obj)/$(DEPTH)/cmn_dev/target_if/direct_buf_rx/inc
26INCS += -I$(obj)/$(DEPTH)/cmn_dev/wbuff/inc
27INCS += -I$(obj)/$(DEPTH)/cmn_dev/cfg/inc
28INCS += -I$(obj)/$(DEPTH)/ini_cfg/inc/
29INCS += -I$(obj)/$(DEPTH)/component_dev/wmi/inc
30INCS += -I$(obj)/$(DEPTH)/pld/inc
31INCS += -I$(obj)/$(DEPTH)/component_dev/dp/inc
32
33INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/crypto/inc
34INCS += -I$(obj)/$(DEPTH)/component_dev/crypto/inc
35
36ifeq ($(WLAN_SUPPORT_GREEN_AP), 1)
37INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/green_ap/dispatcher/inc
38endif
39
40#Start of offload related deifines
41HOST_CMN_CONVG_SRC := $(DEPTH)/cmn_dev
42
43INCS += -I$(obj)/$(DEPTH)/include -I$(obj)/$(DEPTH)/umac/include \
44        -I$(obj)/$(DEPTH)/umac/crypto \
45        -I$(obj)/$(DEPTH)/umac/scan -I$(obj)/$(DEPTH)/umac/resmgr \
46        -I$(obj)/$(DEPTH)/umac/pm -I$(obj)/$(DEPTH)/umac/txrx \
47        -I$(obj)/$(DEPTH)/umac/acs -I$(obj)/$(DEPTH)/umac/txbf \
48        -I$(obj)/$(DEPTH)/umac/wnm \
49        -I$(obj)/$(DEPTH)/umac/tdls \
50        -I$(obj)/$(DEPTH)/umac/rpt_placement \
51        -I$(obj)/$(DEPTH)/umac/wifipos \
52        -I$(obj)/$(DEPTH)/umac/wds -I$(obj)/$(DEPTH)/umac/ique \
53        -I$(obj)/$(DEPTH)/umac/vi_dbg \
54        -I$(obj)/$(DEPTH)/umac/smart_antenna \
55        -I$(obj)/$(DEPTH)/umac/smart_ant \
56        -I$(obj)/$(DEPTH)/umac/ald \
57        -I$(obj)/$(DEPTH)/lmac/ath_pktlog \
58        -I$(obj)/$(DEPTH)/os/linux/mem/ \
59        -I$(obj)/$(DEPTH)/umac/base \
60        -I$(obj)/$(DEPTH)/qca_ol \
61        -I$(obj)/$(DEPTH)/cmn_dev/qdf/inc \
62        -I$(obj)/$(DEPTH)/cmn_dev/qdf/linux/src \
63        -I$(obj)/$(DEPTH)/cmn_dev/qal/inc \
64        -I$(obj)/$(DEPTH)/cmn_dev/qal/linux/src \
65        -I$(obj)/$(DEPTH)/cmn_dev/hif \
66        -I$(obj)/$(DEPTH)/cmn_dev/hif/inc \
67        -I$(obj)/$(DEPTH)/cmn_dev/hif/src \
68        -I$(obj)/$(DEPTH)/cmn_dev/hif/src/ce \
69        -I$(obj)/$(DEPTH)/cmn_dev/hif/src/pcie \
70        -I$(obj)/$(DEPTH)/cmn_dev/hif/src/snoc \
71        -I$(obj)/$(DEPTH)/cmn_dev/hif/src/dispatcher \
72        -I$(obj)/$(DEPTH)/cmn_dev/pld_stub/inc  \
73        -I$(obj)/$(DEPTH)/cmn_dev/hal/inc \
74        -I$(obj)/$(DEPTH)/cmn_dev/hal/wifi3.0 \
75        -I$(obj)/$(DEPTH)/cmn_dev/dp/inc \
76        -I$(obj)/$(DEPTH)/cmn_dev/dp/wifi3.0 \
77        -I$(obj)/$(DEPTH)/cmn_dev/wlan_cfg \
78        -I$(obj)/$(HOST_CMN_CONVG_SRC)/htc \
79        -I$(obj)/$(DEPTH)/cmn_dev/wmi/inc \
80        -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/obj_mgr/inc \
81        -I$(obj)/$(HOST_CMN_CONVG_SRC)/scheduler/inc \
82        -I$(obj)/$(HOST_CMN_CONVG_SRC)/init_deinit/dispatcher/inc \
83        -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/inc \
84        -I$(obj)/$(DEPTH)/cmn_dev/umac/global_umac_dispatcher/lmac_if/inc \
85        -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/mgmt_txrx/dispatcher/inc \
86        -I$(obj)/$(DEPTH)/cmn_dev/target_if/init_deinit/inc \
87        -I$(obj)/$(DEPTH)/cmn_dev/global_lmac_if/inc \
88        -I$(obj)/$(DEPTH)/cmn_dev/os_if/linux \
89        -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/cmn_defs/inc \
90        -I$(obj)/$(DEPTH)/cmn_dev/target_if/core/inc \
91        -I$(obj)/$(DEPTH)/cmn_dev/umac/scan/dispatcher/inc \
92        -I$(obj)/$(DEPTH)/umac/scan \
93        -I$(obj)/$(DEPTH)/cmn_dev/ol_if \
94        -I$(obj)/$(DEPTH)/cmn_dev/target_if/scan/inc \
95        -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/serialization/core/inc \
96        -I$(obj)/$(DEPTH)/cmn_dev/umac/regulatory/dispatcher/inc \
97        -I$(obj)/$(DEPTH)/cmn_dev/target_if/regulatory/inc \
98        -I$(obj)/$(DEPTH)/cmn_dev/umac/mlme/mlme_objmgr/dispatcher/inc/ \
99        -I$(obj)/$(DEPTH)/cmn_dev/umac/mlme/vdev_mgr/dispatcher/inc \
100        -I$(obj)/$(DEPTH)/cmn_dev/umac/mlme/pdev_mgr/dispatcher/inc \
101        -I$(obj)/$(DEPTH)/direct_attach/hal/linux \
102
103INCS += -I$(obj)/$(DEPTH)/cmn_dev/target_if/iot_sim
104INCS += -I$(obj)/$(DEPTH)/cmn_dev/wmi/inc
105#end of offload related defines
106
107ifeq ($(QCA_CFR_SUPPORT), 1)
108ccflags-y+= -DWLAN_CFR_ENABLE=1
109INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cfr/dispatcher/inc/
110INCS += -I$(obj)/$(DEPTH)/component_dev/umac/cfr/dispatcher/inc
111INCS += -I$(obj)/$(DEPTH)/component_dev/qal/inc
112endif
113
114INCS += -I$(obj)/$(DEPTH)/cmn_dev/iot_sim/core
115INCS += -I$(obj)/$(DEPTH)/cmn_dev/iot_sim/dispatcher/inc
116
117obj-m += qca_iot_sim.o
118
119inc_file := $(obj)/$(DEPTH)/iot_inc_opts
120inc_var := $(shell echo $(INCS) > $(inc_file))
121var := "@$(inc_file)"
122
123ccflags-y+= $(var) $(COPTS)
124
125ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
126MOD_CFLAGS = -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(qca_iot_sim.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(qca_iot_sim)"
127endif
128
129IOT_SIM_CMN_OBJS +=  core/iot_sim_common.o \
130                     dispatcher/src/wlan_iot_sim_utils_api.o \
131                     dispatcher/src/wlan_iot_sim_tgt_api.o \
132		     core/iot_sim_utils.o \
133		     core/iot_sim_module.o
134
135qca_iot_sim-objs +=  ${IOT_SIM_CMN_OBJS}
136
137ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
138all: qca_iot_sim.ko
139
140qca_iot_sim.mod.o: qca_iot_sim.mod.c
141	${CC} -c -o $@ ${ccflags-y} ${MOD_CFLAGS} $<
142
143qca_iot_sim.o: ${qca_iot_sim-objs}
144	$(LD) -m elf32btsmip -r -o qca_iot_sim.o $(qca_iot_sim-objs)
145	$(KERNELPATH)/scripts/mod/modpost qca_iot_sim.o
146
147qca_iot_sim.ko: qca_iot_sim.o qca_iot_sim.mod.o
148	$(LD) -o qca_iot_sim.ko qca_iot_sim.o qca_iot_sim.mod.o
149
150%.o: %.c
151	${CC} -c -o $@ ${ccflags-y} $<
152endif
153