summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.umbrella.tmk1
-rw-r--r--userspace/Makefile.interface.tmk27
-rw-r--r--userspace/Makefile.tmk97
-rw-r--r--userspace/libnvgpu-unit.export5
4 files changed, 130 insertions, 0 deletions
diff --git a/Makefile.umbrella.tmk b/Makefile.umbrella.tmk
index bd3c3478..a3eab748 100644
--- a/Makefile.umbrella.tmk
+++ b/Makefile.umbrella.tmk
@@ -21,6 +21,7 @@ NV_REPOSITORY_COMPONENTS :=
21 21
22ifneq ($(NV_BUILD_CONFIGURATION_OS_IS_INTEGRITY),1) 22ifneq ($(NV_BUILD_CONFIGURATION_OS_IS_INTEGRITY),1)
23NV_REPOSITORY_COMPONENTS := drivers/gpu/nvgpu 23NV_REPOSITORY_COMPONENTS := drivers/gpu/nvgpu
24NV_REPOSITORY_COMPONENTS += userspace
24endif 25endif
25 26
26# Local Variables: 27# Local Variables:
diff --git a/userspace/Makefile.interface.tmk b/userspace/Makefile.interface.tmk
new file mode 100644
index 00000000..e947439a
--- /dev/null
+++ b/userspace/Makefile.interface.tmk
@@ -0,0 +1,27 @@
1################################### tell Emacs this is a -*- makefile-gmake -*-
2#
3# Copyright (c) 2018, NVIDIA CORPORATION. All Rights Reserved.
4#
5# NVIDIA CORPORATION and its licensors retain all intellectual property
6# and proprietary rights in and to this software, related documentation
7# and any modifications thereto. Any use, reproduction, disclosure or
8# distribution of this software and related documentation without an express
9# license agreement from NVIDIA CORPORATION is strictly prohibited.
10#
11# tmake for SW Mobile component makefile
12#
13# libnvgpu-drv interface makefile fragment
14#
15###############################################################################
16
17ifdef NV_INTERFACE_FLAG_SHARED_LIBRARY_SECTION
18NV_INTERFACE_NAME := nvgpu-unit
19NV_INTERFACE_EXPORTS := libnvgpu-unit
20NV_INTERFACE_PUBLIC_INCLUDES := include
21endif
22
23# Local Variables:
24# indent-tabs-mode: t
25# tab-width: 8
26# End:
27# vi: set tabstop=8 noexpandtab:
diff --git a/userspace/Makefile.tmk b/userspace/Makefile.tmk
new file mode 100644
index 00000000..ba2ad728
--- /dev/null
+++ b/userspace/Makefile.tmk
@@ -0,0 +1,97 @@
1################################### tell Emacs this is a -*- makefile-gmake -*-
2#
3# Copyright (c) 2018 NVIDIA CORPORATION. All Rights Reserved.
4#
5# NVIDIA CORPORATION and its licensors retain all intellectual property
6# and proprietary rights in and to this software, related documentation
7# and any modifications thereto. Any use, reproduction, disclosure or
8# distribution of this software and related documentation without an express
9# license agreement from NVIDIA CORPORATION is strictly prohibited.
10#
11# tmake for SW Mobile component makefile
12#
13###############################################################################
14
15NVGPU_UNIT_COMMON_SRCS := \
16 src/nvgpu.c \
17 src/args.c \
18 src/io.c \
19 src/module.c \
20 src/results.c \
21 src/exec.c
22NVGPU_UNIT_COMMON_INCLUDES := \
23 include \
24 ../drivers/gpu/nvgpu \
25 ../drivers/gpu/nvgpu/include
26
27
28ifdef NV_COMPONENT_FLAG_NVTEST_EXECUTABLE_SECTION
29include $(NV_BUILD_START_COMPONENT)
30
31NV_COMPONENT_NAME := nvgpu_unit
32NV_COMPONENT_SOURCES := \
33 src/unit_main.c \
34 $(NVGPU_UNIT_COMMON_SRCS)
35
36NV_COMPONENT_INCLUDES := \
37 $(NVGPU_UNIT_COMMON_INCLUDES)
38
39ifneq ($(NV_BUILD_CONFIGURATION_OS_IS_QNX),1)
40NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += pthread
41NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += dl
42NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += gcov
43endif
44
45NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__
46
47NV_UNIT_SH=unit.sh
48NV_COMPONENT_SYSTEMIMAGE_DIR := $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)/nvgpu_unit
49systemimage:: $(NV_COMPONENT_SYSTEMIMAGE_DIR) $(NV_COMPONENT_SYSTEMIMAGE_DIR)/$(NV_UNIT_SH)
50
51#make the output directory
52$(NV_COMPONENT_SYSTEMIMAGE_DIR) : $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)
53 $(MKDIR_P) $@
54
55#copy the test script
56$(NV_COMPONENT_SYSTEMIMAGE_DIR)/$(NV_UNIT_SH) : $(NV_COMPONENT_DIR)/$(NV_UNIT_SH) $(NV_COMPONENT_SYSTEMIMAGE_DIR)
57 $(CP) $< $@
58
59include $(NV_BUILD_NVTEST_EXECUTABLE)
60
61endif
62
63ifdef NV_COMPONENT_FLAG_SHARED_LIBRARY_SECTION
64include $(NV_BUILD_START_COMPONENT)
65
66NV_COMPONENT_NAME := nvgpu_unit-lib
67NV_COMPONENT_OWN_INTERFACE_DIR := .
68
69NV_COMPONENT_SOURCES := \
70 $(NVGPU_UNIT_COMMON_SRCS)
71
72NV_COMPONENT_INCLUDES := \
73 $(NVGPU_UNIT_COMMON_INCLUDES)
74
75
76ifneq ($(NV_BUILD_CONFIGURATION_OS_IS_QNX),1)
77NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += pthread
78NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += dl
79endif
80
81NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__
82
83NV_COMPONENT_SYSTEMIMAGE_DIR := $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)/nvgpu_unit/
84systemimage:: $(NV_COMPONENT_SYSTEMIMAGE_DIR)
85$(NV_COMPONENT_SYSTEMIMAGE_DIR) : $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)
86 $(MKDIR_P) $@
87NV_COMPONENT_SYSTEMIMAGE_NAME := libnvgpu-unit.so
88
89include $(NV_BUILD_SHARED_LIBRARY)
90
91endif
92
93# Local Variables:
94# indent-tabs-mode: t
95# tab-width: 8
96# End:
97# vi: set tabstop=8 noexpandtab:
diff --git a/userspace/libnvgpu-unit.export b/userspace/libnvgpu-unit.export
new file mode 100644
index 00000000..4238b30c
--- /dev/null
+++ b/userspace/libnvgpu-unit.export
@@ -0,0 +1,5 @@
1# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
2
3__core_print_stdout
4__core_print_stderr
5__unit_info_color