aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-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"