Skip to content

Instantly share code, notes, and snippets.

@fcicq
Last active July 11, 2019 07:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fcicq/5331f348d92626c10faeb98c8da70e3d to your computer and use it in GitHub Desktop.
Save fcicq/5331f348d92626c10faeb98c8da70e3d to your computer and use it in GitHub Desktop.
ifeq ($(KERNEL_OVERLAYS),)
KERNEL_OVERLAYS :=
KERNEL_OVERLAYS += $(CURDIR)/../nvidia
KERNEL_OVERLAYS += $(CURDIR)/../nvgpu
KERNEL_OVERLAYS += $(CURDIR)/../nvgpu-next
KERNEL_OVERLAYS += $(CURDIR)/../nvidia-t23x
else
override KERNEL_OVERLAYS := $(subst :, ,$(KERNEL_OVERLAYS))
endif
override KERNEL_OVERLAYS := $(abspath $(KERNEL_OVERLAYS))
export KERNEL_OVERLAYS
define set_srctree_overlay
overlay_name := $(lastword $(subst /, ,$(overlay)))
srctree.$(overlay_name) := $(overlay)
export srctree.$(overlay_name)
endef
$(foreach overlay,$(KERNEL_OVERLAYS),$(eval $(value set_srctree_overlay)))
# ... add after VPATH!
VPATH += $(foreach overlay,$(KERNEL_OVERLAYS),:$(overlay))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment