aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2020-07-13 01:25:07 -0400
committerRob Austein <sra@hactrn.net>2020-07-13 01:25:07 -0400
commit3b33d6df40d6c6b12611ece5c45592d95bd4c12c (patch)
treedae13c012b72aa9757e619f74b362fc58dec6d3e /Makefile
parentbf8e254c435c972a7ab28700eab48a2b6ae79c57 (diff)
Yet another wired-in python version
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4fa034c..b38d05e 100644
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,10 @@ LIBTFM_BLD ?= ${PKCS11_DIR}/libtfm
export LIBHAL_SRC LIBHAL_BLD LIBTFM_SRC LIBTFM_BLD
+# Python executable to use for scripts run during this build
+
+PYTHON ?= python3
+
# Whether to enable threading. Main reason for being able to turn it
# off is that gdb on the Novena (sometimes) goes bananas when
# threading is enabled.
@@ -159,10 +163,10 @@ ${LIBHAL_BLD}/libhal.a: .FORCE ${LIBTFM_BLD}/libtfm.a
${MAKE} -C libhal ${LIBHAL_TARGET}
attributes.h: attributes.yaml scripts/build-attributes Makefile
- python scripts/build-attributes attributes.yaml attributes.h
+ ${PYTHON} scripts/build-attributes attributes.yaml attributes.h
cryptech/py11/attribute_map.py: attributes.yaml scripts/build-py11-attributes Makefile
- python scripts/build-py11-attributes attributes.yaml $@
+ ${PYTHON} scripts/build-py11-attributes attributes.yaml $@
pkcs11.o: pkcs11.c attributes.h ${LIBS}
${CC} ${CFLAGS} -c $<
@@ -189,7 +193,7 @@ TAGS: *.[ch]
# Basic testing, via the Python unittest library and our cryptech.py11 interface code
test: all
- python unit_tests.py --libpkcs11 ./${SONAME}
+ ${PYTHON} unit_tests.py --libpkcs11 ./${SONAME}
# Further testing using hsmbully, if we can find a copy of it.