aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-06-26 10:26:52 -0400
committerRob Austein <sra@hactrn.net>2016-06-26 10:26:52 -0400
commit64e5fe8edec2c4ba461e712d6fbd05d47d5a9192 (patch)
tree5aea327aeab4c5946d286b965cc53bfe3edef6f7 /Makefile
parent2cd3b6fabe5e32f169257caf5532b2bf9c83f803 (diff)
Update libhal makefiles to use new LIBxxx_SRC / LIBxxx_BLD scheme so libhal can find tfm.h again.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 3e4964d..13b43d5 100644
--- a/Makefile
+++ b/Makefile
@@ -183,18 +183,22 @@ ifndef CRYPTECH_ROOT
CRYPTECH_ROOT := $(abspath ../..)
endif
-TFMDIR ?= ${CRYPTECH_ROOT}/sw/thirdparty/libtfm
-CFLAGS += -g3 -Wall -std=c99 -Wno-strict-aliasing -I${TFMDIR}
-LDFLAGS += -g3 -L${TFMDIR} -ltfm
+LIBTFM_SRC ?= ${CRYPTECH_ROOT}/sw/thirdparty/libtfm
+LIBTFM_BLD ?= ${LIBTFM_SRC}
+# tfm.h is a generated file, because our Makefile customizes a few
+# settings from the upstream libtfm distribution. Because of this, we
+# need to search the libtfm build directory, not the libtfm source
+# directory.
+
+CFLAGS += -g3 -Wall -std=c99 -Wno-strict-aliasing
CFLAGS += -DHAL_STATIC_HASH_STATE_BLOCKS=${STATIC_HASH_STATE_BLOCKS}
CFLAGS += -DHAL_STATIC_HMAC_STATE_BLOCKS=${STATIC_HMAC_STATE_BLOCKS}
CFLAGS += -DHAL_STATIC_PKEY_STATE_BLOCKS=${STATIC_PKEY_STATE_BLOCKS}
-
CFLAGS += -I${CRYPTECH_ROOT}/sw/libhal
+CFLAGS += -I${LIBTFM_BLD}
export CFLAGS
-export LDFLAGS
all: ${LIB}
cd tests; ${MAKE} $@