diff options
author | Anup Mahindre <amahindre@nvidia.com> | 2018-08-03 06:50:04 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-14 15:10:31 -0400 |
commit | 02f9c99e4b4a452ded20978c5ee1e27b775b9224 (patch) | |
tree | 10ec1a2470cdcf86101104c98e60a391037f0365 | |
parent | 7306f2b13106a2464fcc83493554368d31ba2d44 (diff) |
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>
-rw-r--r-- | userspace/Makefile | 14 | ||||
-rw-r--r-- | userspace/Makefile.sources | 5 |
2 files changed, 16 insertions, 3 deletions
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 | |||
39 | # Nvgpu driver code. | 39 | # Nvgpu driver code. |
40 | NVGPU_SRC=$(TWD)/../drivers/gpu/nvgpu | 40 | NVGPU_SRC=$(TWD)/../drivers/gpu/nvgpu |
41 | NVGPU_OUT=$(OUT)/libnvgpu | 41 | NVGPU_OUT=$(OUT)/libnvgpu |
42 | # Nvgpu_next driver code. | ||
43 | NVGPU_NEXT_SRC=$(TWD)/../../nvgpu-next/drivers/gpu/nvgpu | ||
42 | 44 | ||
43 | # Unit tests themselves. | 45 | # Unit tests themselves. |
44 | UNIT_SRC=$(TWD)/units | 46 | UNIT_SRC=$(TWD)/units |
45 | UNIT_OUT=$(OUT)/units | 47 | UNIT_OUT=$(OUT)/units |
46 | 48 | ||
47 | INCLUDES= \ | 49 | INCLUDES= \ |
48 | -I$(NVGPU_SRC) \ | 50 | -I$(NVGPU_SRC) \ |
49 | -I$(NVGPU_SRC)/include \ | 51 | -I$(NVGPU_SRC)/include \ |
52 | -I$(NVGPU_NEXT_SRC) \ | ||
53 | -I$(NVGPU_NEXT_SRC)/include \ | ||
50 | -I$(TWD)/../include \ | 54 | -I$(TWD)/../include \ |
51 | -I$(TWD)/../include/uapi \ | 55 | -I$(TWD)/../include/uapi \ |
52 | -I$(TWD)/include | 56 | -I$(TWD)/include |
@@ -107,6 +111,14 @@ $(NVGPU_OUT)/%.o : $(NVGPU_SRC)/%.c $(HEADERS) | |||
107 | fi | 111 | fi |
108 | $(CC) --coverage $(CFLAGS) $(configs) -c -o $@ $< | 112 | $(CC) --coverage $(CFLAGS) $(configs) -c -o $@ $< |
109 | 113 | ||
114 | # Default build target for all the nvgpu-next driver object files we want to | ||
115 | # build in userspace. These too get bundled into libnvgpu-drv.so. | ||
116 | $(NVGPU_OUT)/%.o : $(NVGPU_NEXT_SRC)/%.c $(HEADERS) $(HEADERS_NEXT) | ||
117 | @if [ ! -d $(dir $@) ] ; then \ | ||
118 | mkdir -p $(dir $@) ; \ | ||
119 | fi | ||
120 | $(CC) --coverage $(CFLAGS) $(configs) -c -o $@ $< | ||
121 | |||
110 | # Build target for unit test files. These are not part of the libnvgpu-drv.so. | 122 | # Build target for unit test files. These are not part of the libnvgpu-drv.so. |
111 | # These comprise the unit test framework. | 123 | # These comprise the unit test framework. |
112 | $(CORE_OUT)/%.o : $(CORE_SRC)/%.c $(CORE_HEADERS) | 124 | $(CORE_OUT)/%.o : $(CORE_SRC)/%.c $(CORE_HEADERS) |
diff --git a/userspace/Makefile.sources b/userspace/Makefile.sources index 329871f8..cbb88319 100644 --- a/userspace/Makefile.sources +++ b/userspace/Makefile.sources | |||
@@ -20,9 +20,10 @@ | |||
20 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | # DEALINGS IN THE SOFTWARE. | 21 | # DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | include ../drivers/gpu/nvgpu/Makefile.sources | 23 | include $(NVGPU_SRC)/Makefile.sources |
24 | -include $(NVGPU_NEXT_SRC)/Makefile.sources | ||
24 | 25 | ||
25 | OBJS := $(srcs:%.c=$(NVGPU_OUT)/%.o) | 26 | OBJS := $(srcs:%.c=$(NVGPU_OUT)/%.o) $(srcs_next:%.c=$(NVGPU_OUT)/%.o) |
26 | 27 | ||
27 | HEADERS := \ | 28 | HEADERS := \ |
28 | $(NVGPU_SRC)/include/nvgpu/*.h \ | 29 | $(NVGPU_SRC)/include/nvgpu/*.h \ |