aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2017-03-08 21:06:52 -0500
committerRob Austein <sra@hactrn.net>2017-03-08 21:06:52 -0500
commitf88ab56a8d9d7ecaffae692073769080eab827a4 (patch)
tree20ccddc9ef479d96f8841b0f1ebea73b9c404b5f
parent0decf6ba0bcaf7bd4a9dd93c8b71832ea249cf37 (diff)
Check for cryptech_muxd when setting LIBHAL_TARGET.
-rw-r--r--Makefile17
1 files changed, 14 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9322855..4669c3b 100644
--- a/Makefile
+++ b/Makefile
@@ -97,16 +97,27 @@ LIBS := ${LIBHAL_BLD}/libhal.a ${LIBTFM_BLD}/libtfm.a
# secure channel protocol, which we'll probably want to run over a
# SOCK_STREAM connection in any case.
-LIBHAL_TARGET := daemon
+# Temporary kludge: attempt to detect whether the version of libhal
+# we're using includes cryptech_muxd, and set LIBHAL_TARGET
+# accordingly. This should go away when all the current branches
+# finally get merged back into master, but for the moment it's simpler
+# to do this than to have to maintain a separate pymux branch of
+# sw/pkcs11 whose sole difference from the ksng branch is the
+# LIBHAL_TARGET setting.
+
+#LIBHAL_TARGET := daemon
+ifeq "$(wildcard ../libhal/cryptech_muxd)" ""
+ LIBHAL_TARGET := serial
+else
+ LIBHAL_TARGET := daemon
+endif
ifeq "${UNAME}" "Darwin"
SONAME := libcryptech-pkcs11.dylib
SOFLAGS := -dynamiclib
-# LIBHAL_TARGET := serial
else
SONAME := libcryptech-pkcs11.so
SOFLAGS := -Wl,-Bsymbolic-functions -Wl,-Bsymbolic -Wl,-z,noexecstack -Wl,-soname,${SONAME}.0
-# LIBHAL_TARGET := daemon
endif
ifeq "${ENABLE_FOOTNOTE_WARNINGS}" "no"