libhsakmt: specify build output via variable

Makefile currently sends build output a default location.
Allow choice of build output location if so desired
using a variable.



Signed-off-by: David Ogbeide <davidboyowa.ogbeide@amd.com>


[ROCm/ROCR-Runtime commit: 8a01cd1212]
This commit is contained in:
David Ogbeide committed 2015-09-01 14:30:53 -04:00
1 والد 9db147f2d4
کامیت 7ea9567094
1 file changed
+9 -2
@@ -26,9 +26,16 @@ OBJS = debug.o globals.o memory.o perfctr.o time.o version.o \
# Default target
all: lnx lnx64a
BUILD_ROOT = ../build
BUILDDIR = $(BUILD_ROOT)/$(MAKECMDGOALS)
# To relocate build output, set "O=target/dir/"
# otherwise it defaults to a local directory
ifdef O
BUILD_ROOT := $(O)
else
BUILD_ROOT := ../build
endif
BUILDDIR = $(BUILD_ROOT)/$(MAKECMDGOALS)
TARGET = $(addprefix $(BUILDDIR)/,$(OBJS))
$(BUILDDIR)/$(LIB_NAME).$(LIB_MAJOR_VER): $(TARGET)