summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ce5fefe)
raw | patch | inline | side by side (parent: ce5fefe)
author | Jerome Forissier <jerome.forissier@linaro.org> | |
Fri, 25 Nov 2016 14:07:01 +0000 (15:07 +0100) | ||
committer | Jerome Forissier <jerome.forissier@linaro.org> | |
Fri, 16 Dec 2016 10:09:27 +0000 (11:09 +0100) |
Update so that absolute as well as relative paths are accepted by the
Makefile.
Tested with:
$ export CFG_WITH_SQLFS=y
$ make
$ make O=build
$ make O=/tmp/build
$ make O=~/build
Note that tilde expansion is supposed to be done by the calling shell.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Suggested-by: Zeng Tao <prime.zeng@hisilicon.com>
Acked-by: Zeng Tao <prime.zeng@hisilicon.com>
Makefile.
Tested with:
$ export CFG_WITH_SQLFS=y
$ make
$ make O=build
$ make O=/tmp/build
$ make O=~/build
Note that tilde expansion is supposed to be done by the calling shell.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Suggested-by: Zeng Tao <prime.zeng@hisilicon.com>
Acked-by: Zeng Tao <prime.zeng@hisilicon.com>
diff --git a/config.mk b/config.mk
index 4534cbca02044dc97bce8d1e35acedc44ecefd14..2cffc55350f370087f61730a15741de8d0f3b04b 100644 (file)
--- a/config.mk
+++ b/config.mk
# such as 1008.5 that test loading of corrupt TAs.
CFG_TA_TEST_PATH ?= 1
-# Default out dir.
-# Must be a relative path with respect to the op-tee-client root directory
+# Default output directory.
+# May be absolute, or relative to the optee_client source directory.
O ?= out
-export O
+
+# To be used instead of $(O) in sub-directories
+OO := $(if $(filter /%,$(O)),$(O),$(CURDIR)/../$(O))
#########################################################################
# Private Values #
diff --git a/libsqlfs/Makefile b/libsqlfs/Makefile
index 656e94cc40f001878d4985c6cd2bfb682df46dd5..b53ccde724fa49444dbebe0f7966a66c24db0f5f 100644 (file)
--- a/libsqlfs/Makefile
+++ b/libsqlfs/Makefile
# and/or linking it statically! See COPYING section 6.
include ../flags.mk
+include ../config.mk
-O ?= out
-OUT_DIR ?= ${CURDIR}/../$(O)/libsqlfs
+OUT_DIR := $(OO)/libsqlfs
.PHONY: all libsqlfs clean
-Wno-missing-format-attribute
SQLFS_LFLAGS := -lpthread
-SQLFS_LIBS := $(CURDIR)/../$(O)/libsqlite3/libsqlite3.a
+SQLFS_LIBS := $(OUT_DIR)/../libsqlite3/libsqlite3.a
SQLFS_LIBRARY := $(OUT_DIR)/$(LIB_MAJ_MIN)
libsqlfs: $(SQLFS_LIBRARY)
+ $(VPREFIX)mkdir -p $(OUT_DIR)
$(VPREFIX)ln -sf $(SQLFS_LIBRARY) $(OUT_DIR)/$(LIB_MAJOR)
$(VPREFIX)ln -sf $(OUT_DIR)/$(LIB_MAJOR) $(OUT_DIR)/$(LIB_NAME)
diff --git a/libsqlite3/Makefile b/libsqlite3/Makefile
index 85d0d0aed09344ee1eb8daf624bd75b81b14c087..a69aabd7c97e59553ed14f9ca369411b3524d7ed 100644 (file)
--- a/libsqlite3/Makefile
+++ b/libsqlite3/Makefile
include ../flags.mk
+include ../config.mk
-O ?= out
-OUT_DIR ?= ${CURDIR}/../$(O)/libsqlite3
+OUT_DIR := $(OO)/libsqlite3
.PHONY: all libsqlite3 clean
diff --git a/libteec/Makefile b/libteec/Makefile
index effc5862b73c5baa9ac3a21f32657f0179dfdcc5..66055a723a2d34d9b3ba11891770bb02d5f6c995 100644 (file)
--- a/libteec/Makefile
+++ b/libteec/Makefile
include ../flags.mk
+include ../config.mk
-OUT_DIR ?= ${CURDIR}/../$(O)/libteec
+OUT_DIR := $(OO)/libteec
.PHONY: all libteec clean
index 0ebdd2fac13d06aba7e888f290826664c79636f3..af4024d7f7c382121ac99ec906fbe2bf73ad9c38 100644 (file)
--- a/tee-supplicant/Makefile
+++ b/tee-supplicant/Makefile
include ../flags.mk
include ../config.mk
-OUT_DIR ?= ${CURDIR}/../$(O)/tee-supplicant
+OUT_DIR := $(OO)/tee-supplicant
# Emulate RPMB ioctl's
RPMB_EMU := 1