xref: /wlan-driver/platform/Makefile (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour NameKERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
2*5113495bSYour NameM ?= $(shell pwd)
3*5113495bSYour Name
4*5113495bSYour Name# $(WLAN_PLATFORM_ROOT) has to be a absolute path
5*5113495bSYour Nameifeq ($(WLAN_PLATFORM_ROOT),)
6*5113495bSYour NameWLAN_PLATFORM_ROOT = $(shell pwd)
7*5113495bSYour Name
8*5113495bSYour Name# If it reaches here, compilation is probably without Android.mk,
9*5113495bSYour Name# so enable all flags (including debug flag CONFIG_CNSS2_DEBUG) by
10*5113495bSYour Name# default.
11*5113495bSYour NameKBUILD_OPTIONS := WLAN_PLATFORM_ROOT=$(WLAN_PLATFORM_ROOT)
12*5113495bSYour Nameifeq ($(WLAN_BASEMACHINE),qcs40x)
13*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_OUT_OF_TREE=y
14*5113495bSYour NameKBUILD_OPTIONS += CONFIG_ICNSS2=m
15*5113495bSYour NameKBUILD_OPTIONS += CONFIG_ICNSS2_QMI=y
16*5113495bSYour NameKBUILD_OPTIONS += CONFIG_ICNSS2_DEBUG=y
17*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_QMI_SVC=m
18*5113495bSYour NameKBUILD_OPTIONS += CONFIG_WCNSS_MEM_PRE_ALLOC=m
19*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_UTILS=m
20*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_GENL=m
21*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_PLAT_IPC_QMI_SVC=m
22*5113495bSYour Nameelse ifeq ($(USE_EXTERNAL_CONFIGS),)
23*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_OUT_OF_TREE=y
24*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS2=m
25*5113495bSYour NameKBUILD_OPTIONS += CONFIG_ICNSS2=m
26*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS2_QMI=y
27*5113495bSYour NameKBUILD_OPTIONS += CONFIG_ICNSS2_QMI=y
28*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS2_DEBUG=y
29*5113495bSYour NameKBUILD_OPTIONS += CONFIG_ICNSS2_DEBUG=y
30*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_QMI_SVC=m
31*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_PLAT_IPC_QMI_SVC=m
32*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_GENL=m
33*5113495bSYour NameKBUILD_OPTIONS += CONFIG_WCNSS_MEM_PRE_ALLOC=m
34*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS_UTILS=m
35*5113495bSYour NameKBUILD_OPTIONS += CONFIG_CNSS2_SSR_DRIVER_DUMP=y
36*5113495bSYour Nameendif
37*5113495bSYour Nameendif
38*5113495bSYour Name
39*5113495bSYour Nameall: modules
40*5113495bSYour Name
41*5113495bSYour Name%:
42*5113495bSYour Name	$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)
43*5113495bSYour Name
44*5113495bSYour Namemodules_install:
45*5113495bSYour Name	$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
46*5113495bSYour Name
47*5113495bSYour Nameclean:
48*5113495bSYour Name	$(MAKE) -C $(KERNEL_SRC) M=$(M) clean
49