drm/nouveau: fix out-of-tree module build
authorBen Skeggs <bskeggs@redhat.com>
Wed, 29 Jan 2020 07:32:22 +0000 (17:32 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 22 May 2020 01:11:14 +0000 (11:11 +1000)
The $(srctree) addition a while back busted building the out-of-tree
version of the module, and I've been hacking it up ever since.

This allows us to work around the issue.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/Kbuild

index 7a62fa0..49e57fb 100644 (file)
@@ -1,8 +1,10 @@
+NOUVEAU_PATH ?= $(srctree)
+
 # SPDX-License-Identifier: MIT
-ccflags-y += -I $(srctree)/$(src)/include
-ccflags-y += -I $(srctree)/$(src)/include/nvkm
-ccflags-y += -I $(srctree)/$(src)/nvkm
-ccflags-y += -I $(srctree)/$(src)
+ccflags-y += -I $(NOUVEAU_PATH)/$(src)/include
+ccflags-y += -I $(NOUVEAU_PATH)/$(src)/include/nvkm
+ccflags-y += -I $(NOUVEAU_PATH)/$(src)/nvkm
+ccflags-y += -I $(NOUVEAU_PATH)/$(src)
 
 # NVKM - HW resource manager
 #- code also used by various userspace tools/tests