mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
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 <amahindre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1792003 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7306f2b131
commit
02f9c99e4b
@@ -39,6 +39,8 @@ 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
|
||||
@@ -47,6 +49,8 @@ UNIT_OUT=$(OUT)/units
|
||||
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)
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
include ../drivers/gpu/nvgpu/Makefile.sources
|
||||
include $(NVGPU_SRC)/Makefile.sources
|
||||
-include $(NVGPU_NEXT_SRC)/Makefile.sources
|
||||
|
||||
OBJS := $(srcs:%.c=$(NVGPU_OUT)/%.o)
|
||||
OBJS := $(srcs:%.c=$(NVGPU_OUT)/%.o) $(srcs_next:%.c=$(NVGPU_OUT)/%.o)
|
||||
|
||||
HEADERS := \
|
||||
$(NVGPU_SRC)/include/nvgpu/*.h \
|
||||
|
||||
Reference in New Issue
Block a user