From 1a9bc0894936ca7630fecf9edef6e5ba12d16eed Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sat, 1 Feb 2020 07:26:27 +0100 Subject: [PATCH] Support in-tree compilation --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 40d128e..3be1dea 100755 --- a/Makefile +++ b/Makefile @@ -158,9 +158,11 @@ CONFIG_CUSTOMER_HUAWEI_GENERAL = n CONFIG_DRVEXT_MODULE = n ifeq ($(CONFIG_RTL8812AU), ) -export TopDIR ?= $(shell pwd) +ifneq (,$(findstring /usr/lib/dkms,$(PATH))) + export TopDIR ?= $(shell pwd) else -export TopDIR ?= $(shell pwd)/drivers/net/wireless/rtl8812au +export TopDIR ?= $(srctree)/$(src) +endif endif ########### COMMON #################################