--- linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/Makefile.orig	2013-11-28 21:42:10.000000000 +0200
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/Makefile	2013-11-30 21:41:19.550504380 +0200
@@ -9,24 +9,10 @@ DISTFILES = \
 	winnt_types.h workqueue.c wrapmem.c wrapmem.h wrapndis.c wrapndis.h \
 	wrapper.c wrapper.h
 
-# By default, we try to compile the modules for the currently running
-# kernel.  But it's the first approximation, as we will re-read the
-# version from the kernel sources.
-KVERS_UNAME ?= $(shell uname -r)
-
 # KBUILD is the path to the Linux kernel build tree.  It is usually the
 # same as the kernel source tree, except when the kernel was compiled in
 # a separate directory.
-KBUILD ?= $(shell readlink -f /lib/modules/$(KVERS_UNAME)/build)
-
-ifeq (,$(KBUILD))
-$(error Kernel build tree not found - please set KBUILD to configured kernel)
-endif
-
-KCONFIG := $(KBUILD)/.config
-ifeq (,$(wildcard $(KCONFIG)))
-$(error No .config found in $(KBUILD), please set KBUILD to configured kernel)
-endif
+KBUILD ?= $(srctree)
 
 ifneq (,$(wildcard $(KBUILD)/include/linux/version.h))
 ifneq (,$(wildcard $(KBUILD)/include/generated/uapi/linux/version.h))
@@ -43,16 +29,9 @@ endif
 ifeq (,$(wildcard $(VERSION_H)))
 VERSION_H := $(KBUILD)/include/linux/version.h
 endif
-ifeq (,$(wildcard $(VERSION_H)))
-$(error Please run 'make modules_prepare' in $(KBUILD))
-endif
 
 KVERS := $(shell sed -ne 's/"//g;s/^\#define UTS_RELEASE //p' $(VERSION_H))
 
-ifeq (,$(KVERS))
-$(error Cannot find UTS_RELEASE in $(VERSION_H), please report)
-endif
-
 INST_DIR = /lib/modules/$(KVERS)/misc
 
 SRC_DIR=$(shell pwd)
