From 1013320aa016bbeed8522348b24355c8e17ce7f9 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 29 Jan 2022 11:31:18 +0100 Subject: [PATCH] osx needs to link to openssl, since it uses libressl instead --- tools/mfd_aes_brute/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/mfd_aes_brute/Makefile b/tools/mfd_aes_brute/Makefile index a8e11aecb..cff2a1d40 100644 --- a/tools/mfd_aes_brute/Makefile +++ b/tools/mfd_aes_brute/Makefile @@ -1,13 +1,13 @@ MYSRCPATHS = ../../common ../../common/mbedtls MYSRCS = util_posix.c MYINCLUDES = -I../../include -I../../common -I../../common/mbedtls -MYCFLAGS = -march=native -Ofast +MYCFLAGS = -march=native -Ofast -msse2 -msse -maes MYDEFS = MYLDLIBS = -lcrypto -ifneq ($(SKIPPTHREAD),1) -MYLDLIBS += -lpthread -endif +ifneq ($(SKIPPTHREAD),1) + MYLDLIBS += -lpthread +endif BINS = brute_key mfd_aes_brute INSTALLTOOLS = $(BINS) @@ -18,7 +18,12 @@ include ../../Makefile.host ifneq (,$(findstring MINGW,$(platform))) # Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z) # and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1 - CFLAGS += -D_ISOC99_SOURCE + MYCFLAGS += -D_ISOC99_SOURCE +endif + +# OS X needs linking to openssl +ifeq ($(platform),Darwin) + MYLDFLAGS += -L/usr/local/opt/openssl@3/lib endif brute_key : $(OBJDIR)/brute_key.o $(MYOBJS)