diff --git a/userspace/Makefile b/userspace/Makefile index 42e7d1765..9515dc902 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -88,7 +88,7 @@ CFLAGS = -Wall -Wextra -ggdb -Werror -Wno-unused-parameter \ -Wmultichar -Wunused -Wmissing-braces -Wstrict-aliasing \ -Wsign-compare -Waddress -Wno-unused-local-typedefs -fPIC \ -Wno-maybe-uninitialized $(INCLUDES) $(CONFIGS) -LIB_PATHS = -L$(OUT) +LIB_PATHS = -L$(OUT) -L$(UNIT_OUT) LIBS = -lpthread -pthread -lgcov -ldl diff --git a/userspace/Makefile.sources b/userspace/Makefile.sources index 6647c336d..014914872 100644 --- a/userspace/Makefile.sources +++ b/userspace/Makefile.sources @@ -63,6 +63,7 @@ UNITS := \ $(UNIT_SRC)/mm/page_table_faults \ $(UNIT_SRC)/mm/nvgpu_mem \ $(UNIT_SRC)/mm/vm \ + $(UNIT_SRC)/fifo \ $(UNIT_SRC)/fifo/channel \ $(UNIT_SRC)/fifo/runlist \ $(UNIT_SRC)/fifo/tsg \ diff --git a/userspace/units/fifo/Makefile b/userspace/units/fifo/Makefile new file mode 100644 index 000000000..34ca4c543 --- /dev/null +++ b/userspace/units/fifo/Makefile @@ -0,0 +1,27 @@ +# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +.SUFFIXES: + +OBJS = nvgpu-fifo.o nvgpu-fifo-gv11b.o + +MODULE = nvgpu-fifo + +include ../Makefile.units \ No newline at end of file diff --git a/userspace/units/fifo/channel/Makefile b/userspace/units/fifo/channel/Makefile index e2e23bbc4..d1a46e80b 100644 --- a/userspace/units/fifo/channel/Makefile +++ b/userspace/units/fifo/channel/Makefile @@ -20,7 +20,14 @@ .SUFFIXES: -OBJS = nvgpu-channel.o ../nvgpu-fifo.o ../nvgpu-fifo-gv11b.o +OBJS = nvgpu-channel.o MODULE = nvgpu-channel +LIB_PATHS += -lnvgpu-fifo include ../../Makefile.units + +lib$(MODULE).so: fifo + +fifo: + $(MAKE) -C .. + diff --git a/userspace/units/fifo/tsg/Makefile b/userspace/units/fifo/tsg/Makefile index e7d093bdf..096232cc2 100644 --- a/userspace/units/fifo/tsg/Makefile +++ b/userspace/units/fifo/tsg/Makefile @@ -20,7 +20,13 @@ .SUFFIXES: -OBJS = nvgpu-tsg.o ../nvgpu-fifo.o ../nvgpu-fifo-gv11b.o +OBJS = nvgpu-tsg.o MODULE = nvgpu-tsg +LIB_PATHS += -lnvgpu-fifo include ../../Makefile.units + +lib$(MODULE).so: fifo + +fifo: + $(MAKE) -C ..