mirror of
https://github.com/NVIDIA/nccl-tests.git
synced 2026-01-14 02:47:21 +08:00
as relative to top-level directory. This done is by abspath'ing it before
passing it to subdirectory Makefile's.
The old behavior had two cases: with and without BUILDDIR being set by
the user. With BUILDDIR not set, the build dir would be named "build"
in the top-level directory. If BUILDDIR was set, then the build dir
would be placed at "src/${BUILDDIR}".
The new behavior is simpler, if BUILDDIR is not set then it defaults
to "build", and the directory holding the final build is always at just
"${BUILDDIR}" in the top level.
24 lines
389 B
Makefile
24 lines
389 B
Makefile
#
|
|
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
|
|
#
|
|
# See LICENCE.txt for license information
|
|
#
|
|
|
|
BUILDDIR ?= build
|
|
override BUILDDIR := $(abspath $(BUILDDIR))
|
|
|
|
.PHONY : all clean
|
|
|
|
default : src.build
|
|
|
|
TARGETS=src
|
|
|
|
all: ${TARGETS:%=%.build}
|
|
clean: ${TARGETS:%=%.clean}
|
|
|
|
%.build:
|
|
${MAKE} -C $* build BUILDDIR=${BUILDDIR}
|
|
|
|
%.clean:
|
|
${MAKE} -C $* clean BUILDDIR=${BUILDDIR}
|