From 02f9c99e4b4a452ded20978c5ee1e27b775b9224 Mon Sep 17 00:00:00 2001 From: Anup Mahindre Date: Fri, 3 Aug 2018 16:20:04 +0530 Subject: userspace: Enable nvgpu-next build Added targets in corresponding makefiles/sources to enable building nvgpu-next from userspace. JIRA NVGPU-1015 Change-Id: Ia358162e14205035e4552bfb7f32825c7de48fc2 Signed-off-by: Anup Mahindre Reviewed-on: https://git-master.nvidia.com/r/1792003 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'userspace/Makefile') diff --git a/userspace/Makefile b/userspace/Makefile index 1483aa24..7ce5179d 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -39,14 +39,18 @@ CORE_OUT=$(OUT)/nvgpu_unit_core # Nvgpu driver code. NVGPU_SRC=$(TWD)/../drivers/gpu/nvgpu NVGPU_OUT=$(OUT)/libnvgpu +# Nvgpu_next driver code. +NVGPU_NEXT_SRC=$(TWD)/../../nvgpu-next/drivers/gpu/nvgpu # Unit tests themselves. UNIT_SRC=$(TWD)/units UNIT_OUT=$(OUT)/units -INCLUDES= \ +INCLUDES= \ -I$(NVGPU_SRC) \ -I$(NVGPU_SRC)/include \ + -I$(NVGPU_NEXT_SRC) \ + -I$(NVGPU_NEXT_SRC)/include \ -I$(TWD)/../include \ -I$(TWD)/../include/uapi \ -I$(TWD)/include @@ -107,6 +111,14 @@ $(NVGPU_OUT)/%.o : $(NVGPU_SRC)/%.c $(HEADERS) fi $(CC) --coverage $(CFLAGS) $(configs) -c -o $@ $< +# Default build target for all the nvgpu-next driver object files we want to +# build in userspace. These too get bundled into libnvgpu-drv.so. +$(NVGPU_OUT)/%.o : $(NVGPU_NEXT_SRC)/%.c $(HEADERS) $(HEADERS_NEXT) + @if [ ! -d $(dir $@) ] ; then \ + mkdir -p $(dir $@) ; \ + fi + $(CC) --coverage $(CFLAGS) $(configs) -c -o $@ $< + # Build target for unit test files. These are not part of the libnvgpu-drv.so. # These comprise the unit test framework. $(CORE_OUT)/%.o : $(CORE_SRC)/%.c $(CORE_HEADERS) -- cgit v1.2.2