aboutsummaryrefslogtreecommitdiff
path: root/libhal
diff options
context:
space:
mode:
Diffstat (limited to 'libhal')
-rw-r--r--libhal/Makefile14
-rw-r--r--libhal/tests/Makefile12
-rw-r--r--libhal/utils/Makefile12
3 files changed, 22 insertions, 16 deletions
diff --git a/libhal/Makefile b/libhal/Makefile
index 82fc389..9274dd9 100644
--- a/libhal/Makefile
+++ b/libhal/Makefile
@@ -2,14 +2,12 @@ ifndef CRYPTECH_ROOT
CRYPTECH_ROOT := $(abspath ../../..)
endif
-TFMDIR := $(abspath ../libtfm)
+LIBHAL_SRC ?= ${CRYPTECH_ROOT}/sw/libhal
+LIBTFM_BLD ?= $(abspath ../libtfm)
-INC = ${CRYPTECH_ROOT}/sw/libhal/hal.h
-LIB = ../libhal.a
+CFLAGS += -I${LIBHAL_SRC}
-CFLAGS += -I${CRYPTECH_ROOT}/sw/libhal
+vpath %.c ${LIBHAL_SRC}
+vpath %.h ${LIBHAL_SRC}:${LIBTFM_BLD}
-vpath %.c ${CRYPTECH_ROOT}/sw/libhal
-vpath %.h ${CRYPTECH_ROOT}/sw/libhal:${LIBTFM_DIR}
-
-include ${CRYPTECH_ROOT}/sw/libhal/Makefile
+include ${LIBHAL_SRC}/Makefile
diff --git a/libhal/tests/Makefile b/libhal/tests/Makefile
index 61ad8b8..4e44362 100644
--- a/libhal/tests/Makefile
+++ b/libhal/tests/Makefile
@@ -2,9 +2,13 @@ ifndef CRYPTECH_ROOT
CRYPTECH_ROOT := $(abspath ../../../..)
endif
-TFMDIR := $(abspath ../../libtfm)
+LIBHAL_SRC ?= ${CRYPTECH_ROOT}/sw/libhal
+LIBHAL_BLD ?= $(abspath ..)
-vpath %.c ${CRYPTECH_ROOT}/sw/libhal/tests
-vpath %.h ${CRYPTECH_ROOT}/sw/libhal/tests:${LIBTFM_DIR}
+LIBTFM_SRC ?= ${CRYPTECH_ROOT}/sw/thirdparty/libtfm
+LIBTFM_BLD ?= $(abspath ../../libtfm)
-include ${CRYPTECH_ROOT}/sw/libhal/tests/Makefile
+vpath %.c ${LIBHAL_SRC}/tests
+vpath %.h ${LIBHAL_SRC}/tests:${LIBTFM_BLD}
+
+include ${LIBHAL_SRC}/tests/Makefile
diff --git a/libhal/utils/Makefile b/libhal/utils/Makefile
index b15a0c5..1b8b5a2 100644
--- a/libhal/utils/Makefile
+++ b/libhal/utils/Makefile
@@ -2,9 +2,13 @@ ifndef CRYPTECH_ROOT
CRYPTECH_ROOT := $(abspath ../../../..)
endif
-TFMDIR := $(abspath ../../libtfm)
+LIBHAL_SRC ?= ${CRYPTECH_ROOT}/sw/libhal
+LIBHAL_BLD ?= $(abspath ..)
-vpath %.c ${CRYPTECH_ROOT}/sw/libhal/utils
-vpath %.h ${CRYPTECH_ROOT}/sw/libhal/utils:${LIBTFM_DIR}
+LIBTFM_SRC ?= ${CRYPTECH_ROOT}/sw/thirdparty/libtfm
+LIBTFM_BLD ?= $(abspath ../../libtfm)
-include ${CRYPTECH_ROOT}/sw/libhal/utils/Makefile
+vpath %.c ${LIBHAL_SRC}/utils
+vpath %.h ${LIBHAL_SRC}/utils:${LIBTFM_BLD}
+
+include ${LIBHAL_SRC}/utils/Makefile