Prashanth Bhatta | 24587be | 2014-01-10 12:19:15 -0800 | [diff] [blame] | 1 | KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build |
Manikandan Mohan | b63d991 | 2013-12-12 02:41:48 -0800 | [diff] [blame] | 2 | |
Prashanth Bhatta | 61cd4b5 | 2014-01-28 14:16:54 -0800 | [diff] [blame] | 3 | KBUILD_OPTIONS := WLAN_ROOT=$(PWD) |
Yun Park | e7aea77 | 2016-03-03 15:15:17 -0800 | [diff] [blame] | 4 | KBUILD_OPTIONS += MODNAME?=wlan |
Manikandan Mohan | b63d991 | 2013-12-12 02:41:48 -0800 | [diff] [blame] | 5 | |
Prashanth Bhatta | 61cd4b5 | 2014-01-28 14:16:54 -0800 | [diff] [blame] | 6 | # 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. |
| 9 | LICENSE_FILE ?= $(PWD)/$(WLAN_ROOT)/CORE/HDD/src/wlan_hdd_main.c |
| 10 | WLAN_OPEN_SOURCE = $(shell if grep -q "MODULE_LICENSE(\"Dual BSD/GPL\")" \ |
| 11 | $(LICENSE_FILE); then echo 1; else echo 0; fi) |
| 12 | |
Prashanth Bhatta | 24587be | 2014-01-10 12:19:15 -0800 | [diff] [blame] | 13 | #By default build for CLD |
| 14 | WLAN_SELECT := CONFIG_QCA_CLD_WLAN=m |
| 15 | KBUILD_OPTIONS += CONFIG_QCA_WIFI_ISOC=0 |
| 16 | KBUILD_OPTIONS += CONFIG_QCA_WIFI_2_0=1 |
| 17 | KBUILD_OPTIONS += $(WLAN_SELECT) |
Prashanth Bhatta | 61cd4b5 | 2014-01-28 14:16:54 -0800 | [diff] [blame] | 18 | KBUILD_OPTIONS += WLAN_OPEN_SOURCE=$(WLAN_OPEN_SOURCE) |
Prashanth Bhatta | 24587be | 2014-01-10 12:19:15 -0800 | [diff] [blame] | 19 | KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any |
Madan Mohan Koyyalamudi | e32d219 | 2013-09-28 23:54:37 -0700 | [diff] [blame] | 20 | |
| 21 | all: |
Prashanth Bhatta | 24587be | 2014-01-10 12:19:15 -0800 | [diff] [blame] | 22 | $(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS) |
Madan Mohan Koyyalamudi | e32d219 | 2013-09-28 23:54:37 -0700 | [diff] [blame] | 23 | |
Prashanth Bhatta | 42f70c5 | 2014-02-01 12:08:29 -0800 | [diff] [blame] | 24 | modules_install: |
| 25 | $(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install |
| 26 | |
Madan Mohan Koyyalamudi | e32d219 | 2013-09-28 23:54:37 -0700 | [diff] [blame] | 27 | clean: |
Prashanth Bhatta | 24587be | 2014-01-10 12:19:15 -0800 | [diff] [blame] | 28 | $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean |