@@ -5,9 +5,8 @@
.DEFAULT_GOAL := default
-ODP_ROOT = $(PWD)
+ODP_ROOT = $(CURDIR)
ODP_TESTS = $(ODP_ROOT)/test
-export DESTDIR = $(ODP_ROOT)/build
include $(ODP_ROOT)/Makefile.inc
@@ -7,6 +7,7 @@ PLATFORM ?= linux-generic
OBJ_DIR = ./obj
ODP_DIR = $(ODP_ROOT)/platform/$(PLATFORM)
+export DESTDIR = $(ODP_ROOT)/build
CC ?= gcc
LD ?= gcc
@@ -3,19 +3,5 @@
#
# SPDX-License-Identifier: BSD-3-Clause
-ifdef DESTDIR
-
ODP_LIB = $(DESTDIR)/lib/libodp.a
EXTRA_CFLAGS += -I$(DESTDIR)/include
-EXTRA_CFLAGS += -I$(DESTDIR)/include/api
-
-else
-
-ODP_LIB = $(ODP_DIR)/lib/libodp.a
-EXTRA_CFLAGS += -I$(ODP_ROOT)/include
-EXTRA_CFLAGS += -I$(ODP_DIR)/include/api
-
-$(ODP_LIB):
- @echo Building $@
- $(MAKE) -C $(ODP_DIR) libs
-endif
Test applications should not differ from any other ODP application in a way they use ODP library and headers. They shall use them from DESTDIR. The fact that they are placed in ODP repo do not allow them to abuse it. By using directly library and includes from platform directly we break modularity. Tests' Makefile must have information about platform's include directory structure. So tests' Makefile should be updated every time structure changes. Things get even worse if platform include directory structure differs between implementations (which is a valid case). Removing direct access to platform directory also makes hard to build and install library from tests' Makefile. Only unconditional install is possible, but this adds unnecessary overhead on each test build. So this patch removes this ability. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> --- v1..v2: Remove an ability to build and install ODP library from tests' Makefile v1: http://lists.linaro.org/pipermail/lng-odp/2014-May/000616.html Makefile | 3 +-- Makefile.inc | 1 + test/Makefile.inc | 14 -------------- 3 files changed, 2 insertions(+), 16 deletions(-)