diff options
-rw-r--r-- | Makefile.umbrella.tmk | 1 | ||||
-rw-r--r-- | userspace/Makefile.interface.tmk | 27 | ||||
-rw-r--r-- | userspace/Makefile.tmk | 97 | ||||
-rw-r--r-- | userspace/libnvgpu-unit.export | 5 |
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 | ||
22 | ifneq ($(NV_BUILD_CONFIGURATION_OS_IS_INTEGRITY),1) | 22 | ifneq ($(NV_BUILD_CONFIGURATION_OS_IS_INTEGRITY),1) |
23 | NV_REPOSITORY_COMPONENTS := drivers/gpu/nvgpu | 23 | NV_REPOSITORY_COMPONENTS := drivers/gpu/nvgpu |
24 | NV_REPOSITORY_COMPONENTS += userspace | ||
24 | endif | 25 | endif |
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 | |||
17 | ifdef NV_INTERFACE_FLAG_SHARED_LIBRARY_SECTION | ||
18 | NV_INTERFACE_NAME := nvgpu-unit | ||
19 | NV_INTERFACE_EXPORTS := libnvgpu-unit | ||
20 | NV_INTERFACE_PUBLIC_INCLUDES := include | ||
21 | endif | ||
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 | |||
15 | NVGPU_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 | ||
22 | NVGPU_UNIT_COMMON_INCLUDES := \ | ||
23 | include \ | ||
24 | ../drivers/gpu/nvgpu \ | ||
25 | ../drivers/gpu/nvgpu/include | ||
26 | |||
27 | |||
28 | ifdef NV_COMPONENT_FLAG_NVTEST_EXECUTABLE_SECTION | ||
29 | include $(NV_BUILD_START_COMPONENT) | ||
30 | |||
31 | NV_COMPONENT_NAME := nvgpu_unit | ||
32 | NV_COMPONENT_SOURCES := \ | ||
33 | src/unit_main.c \ | ||
34 | $(NVGPU_UNIT_COMMON_SRCS) | ||
35 | |||
36 | NV_COMPONENT_INCLUDES := \ | ||
37 | $(NVGPU_UNIT_COMMON_INCLUDES) | ||
38 | |||
39 | ifneq ($(NV_BUILD_CONFIGURATION_OS_IS_QNX),1) | ||
40 | NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += pthread | ||
41 | NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += dl | ||
42 | NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += gcov | ||
43 | endif | ||
44 | |||
45 | NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__ | ||
46 | |||
47 | NV_UNIT_SH=unit.sh | ||
48 | NV_COMPONENT_SYSTEMIMAGE_DIR := $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)/nvgpu_unit | ||
49 | systemimage:: $(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 | |||
59 | include $(NV_BUILD_NVTEST_EXECUTABLE) | ||
60 | |||
61 | endif | ||
62 | |||
63 | ifdef NV_COMPONENT_FLAG_SHARED_LIBRARY_SECTION | ||
64 | include $(NV_BUILD_START_COMPONENT) | ||
65 | |||
66 | NV_COMPONENT_NAME := nvgpu_unit-lib | ||
67 | NV_COMPONENT_OWN_INTERFACE_DIR := . | ||
68 | |||
69 | NV_COMPONENT_SOURCES := \ | ||
70 | $(NVGPU_UNIT_COMMON_SRCS) | ||
71 | |||
72 | NV_COMPONENT_INCLUDES := \ | ||
73 | $(NVGPU_UNIT_COMMON_INCLUDES) | ||
74 | |||
75 | |||
76 | ifneq ($(NV_BUILD_CONFIGURATION_OS_IS_QNX),1) | ||
77 | NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += pthread | ||
78 | NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += dl | ||
79 | endif | ||
80 | |||
81 | NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__ | ||
82 | |||
83 | NV_COMPONENT_SYSTEMIMAGE_DIR := $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)/nvgpu_unit/ | ||
84 | systemimage:: $(NV_COMPONENT_SYSTEMIMAGE_DIR) | ||
85 | $(NV_COMPONENT_SYSTEMIMAGE_DIR) : $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR) | ||
86 | $(MKDIR_P) $@ | ||
87 | NV_COMPONENT_SYSTEMIMAGE_NAME := libnvgpu-unit.so | ||
88 | |||
89 | include $(NV_BUILD_SHARED_LIBRARY) | ||
90 | |||
91 | endif | ||
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 | ||