From f88ab56a8d9d7ecaffae692073769080eab827a4 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 8 Mar 2017 21:06:52 -0500 Subject: Check for cryptech_muxd when setting LIBHAL_TARGET. --- Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'Makefile') 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" -- cgit v1.2.3