summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4cde45f)
When building any of the perf-thread examples, the output .o files were
placed in two separate directories for each app: the regular build dir and
a "common" build directory. This was due to the way the files to be built
were specified, using a relative path. Switching to use VPATH to find the
files causes Make to put all .o's into the one build directory.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# list the C files belonhing to the lthread subsystem, these are common to all lthread apps
-SRCS-y += ../common/lthread.c \
- ../common/lthread_sched.c \
- ../common/lthread_cond.c \
- ../common/lthread_tls.c \
- ../common/lthread_mutex.c \
- ../common/lthread_diag.c \
- ../common/arch/x86/ctx.c
+# list the C files belonging to the lthread subsystem, these are common to all
+# lthread apps. Any makefile including this should set VPATH to include this
+# directory path
+#
+
+MKFILE_PATH=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))
+
+VPATH := $(MKFILE_PATH) $(MKFILE_PATH)/arch/x86
+
+SRCS-y += lthread.c lthread_sched.c lthread_cond.c lthread_tls.c lthread_mutex.c lthread_diag.c ctx.c
-INCLUDES += -I$(RTE_SDK)/examples/performance-thread/common/ -I$(RTE_SDK)/examples/performance-thread/common/arch/x86/
+INCLUDES += -I$(MKFILE_PATH) -I$(MKFILE_PATH)/arch/x86/