diff options
author | Srikant Patnaik | 2015-01-13 15:08:24 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-13 15:08:24 +0530 |
commit | 97327692361306d1e6259021bc425e32832fdb50 (patch) | |
tree | fe9088f3248ec61e24f404f21b9793cb644b7f01 /drivers/mt5931/drv_wlan/GNUmakefile.inc | |
parent | 2d05a8f663478a44e088d122e0d62109bbc801d0 (diff) | |
parent | a3a8b90b61e21be3dde9101c4e86c881e0f06210 (diff) | |
download | FOSSEE-netbook-kernel-source-97327692361306d1e6259021bc425e32832fdb50.tar.gz FOSSEE-netbook-kernel-source-97327692361306d1e6259021bc425e32832fdb50.tar.bz2 FOSSEE-netbook-kernel-source-97327692361306d1e6259021bc425e32832fdb50.zip |
dirty fix to merging
Diffstat (limited to 'drivers/mt5931/drv_wlan/GNUmakefile.inc')
-rwxr-xr-x | drivers/mt5931/drv_wlan/GNUmakefile.inc | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/mt5931/drv_wlan/GNUmakefile.inc b/drivers/mt5931/drv_wlan/GNUmakefile.inc new file mode 100755 index 00000000..caa2f1af --- /dev/null +++ b/drivers/mt5931/drv_wlan/GNUmakefile.inc @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------- +# Copyright (c) 2007 MediaTek Inc. +# +# All rights reserved. Copying, compilation, modification, distribution +# or any other use whatsoever of this material is strictly prohibited +# except in accordance with a Software License Agreement with +# MediaTek Inc. +# -------------------------------------------------------------------- + +# -------------------------------------------------------------------- +# This file is used for identifying version of Linux Kernel +# -------------------------------------------------------------------- + +KCHECK_DIR := $(DRV_SRC_DIR)/os/linux/.kcheck + +ifndef LINUX_SRC +$(error LINUX_SRC must be defined - check config.mk !) +endif + +FULL_PATH_CC := $(shell which $(CC) 2> /dev/null) +ifeq ($(FULL_PATH_CC), ) +$(error $(CC) is missing - check config.mk !) +endif + +ifeq ($(shell cd $(LINUX_SRC) 2> /dev/null && pwd), ) +$(error $(LINUX_SRC) is missing - check config.mk !) +endif + +ifndef KERNEL_RELEASE +KERNEL_RELEASE := $(shell $(CC) -E -I $(LINUX_SRC)/include $(KCHECK_DIR)/.kversion.c | grep uts_release | cut -f2 -d'"') +endif + +ifeq ($(filter-out 2.4%, $(KERNEL_RELEASE)), ) +LINUX24 = yes +endif + +ifndef LINUX24 +LINUX26_CC := $(shell $(MAKE) -n -C $(LINUX_SRC) M=$(KCHECK_DIR) 2> /dev/null | grep cc) +LINUX26_CC := $(filter-out -% '% "%,$(LINUX26_CC)) +LINUX26_CC := $(sort $(filter %cc,$(LINUX26_CC))) +FULL_PATH_LINUX26_CC := $(shell which $(LINUX26_CC) 2> /dev/null) +ifeq ($(FULL_PATH_LINUX26_CC), ) +LINUX26_CC := "\"$(LINUX26_CC)\" not found, check $(LINUX_SRC)/Makefile or \$$PATH in current SHELL !" +else +LINUX26_CC := $(FULL_PATH_LINUX26_CC) +endif +endif + +ifneq ($(INSTALL_PATH), ) +ifeq ($(shell cd $(INSTALL_PATH) 2> /dev/null && pwd), ) +INSTALL_PATH := +endif +endif |