blob: f78d774f595d74088131036dc864af290af78901 [file] [log] [blame]
Prashanth Bhatta24587be2014-01-10 12:19:15 -08001KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
Manikandan Mohanb63d9912013-12-12 02:41:48 -08002
Prashanth Bhatta61cd4b52014-01-28 14:16:54 -08003KBUILD_OPTIONS := WLAN_ROOT=$(PWD)
Yun Parke7aea772016-03-03 15:15:17 -08004KBUILD_OPTIONS += MODNAME?=wlan
Manikandan Mohanb63d9912013-12-12 02:41:48 -08005
Prashanth Bhatta61cd4b52014-01-28 14:16:54 -08006# Determine if the driver license is Open source or proprietary
7# This is determined under the assumption that LICENSE doesn't change.
8# Please change here if driver license text changes.
9LICENSE_FILE ?= $(PWD)/$(WLAN_ROOT)/CORE/HDD/src/wlan_hdd_main.c
10WLAN_OPEN_SOURCE = $(shell if grep -q "MODULE_LICENSE(\"Dual BSD/GPL\")" \
11 $(LICENSE_FILE); then echo 1; else echo 0; fi)
12
Prashanth Bhatta24587be2014-01-10 12:19:15 -080013#By default build for CLD
14WLAN_SELECT := CONFIG_QCA_CLD_WLAN=m
15KBUILD_OPTIONS += CONFIG_QCA_WIFI_ISOC=0
16KBUILD_OPTIONS += CONFIG_QCA_WIFI_2_0=1
17KBUILD_OPTIONS += $(WLAN_SELECT)
Prashanth Bhatta61cd4b52014-01-28 14:16:54 -080018KBUILD_OPTIONS += WLAN_OPEN_SOURCE=$(WLAN_OPEN_SOURCE)
Prashanth Bhatta24587be2014-01-10 12:19:15 -080019KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any
Madan Mohan Koyyalamudie32d2192013-09-28 23:54:37 -070020
21all:
Prashanth Bhatta24587be2014-01-10 12:19:15 -080022 $(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS)
Madan Mohan Koyyalamudie32d2192013-09-28 23:54:37 -070023
Prashanth Bhatta42f70c52014-02-01 12:08:29 -080024modules_install:
25 $(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install
26
Madan Mohan Koyyalamudie32d2192013-09-28 23:54:37 -070027clean:
Prashanth Bhatta24587be2014-01-10 12:19:15 -080028 $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean