aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--Makefile.inc1
-rw-r--r--test/Makefile.inc14
3 files changed, 2 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 25123436a..7d10fd5e5 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/Makefile.inc b/Makefile.inc
index 2fa3d97b5..866ab799f 100644
--- a/Makefile.inc
+++ b/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
diff --git a/test/Makefile.inc b/test/Makefile.inc
index f001119b9..8536402c8 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -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