From 22d7adf0c0dc63b72993973aecc83e4b2cb775a4 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 16 Sep 2023 09:32:47 +0200 Subject: [PATCH] getting confused over pthread vs atomic... --- tools/cryptorf/Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/cryptorf/Makefile b/tools/cryptorf/Makefile index ed94fb846..0c4587f97 100644 --- a/tools/cryptorf/Makefile +++ b/tools/cryptorf/Makefile @@ -4,30 +4,35 @@ MYINCLUDES = -I../../common/cryptorf MYCFLAGS = MYDEFS = -platform = $(shell uname) +# build artifacts +BINS = cm sm sma sma_multi +INSTALLTOOLS = $(BINS) + + +include ../../Makefile.host +# checking platform can be done only after Makefile.host # Atomic # RPi Zero gcc requires -latomic +MYLDLIBS += -latomic + +# macOS might not like pthread? ifneq ($(platform),Darwin) MYLDLIBS += -lpthread endif -BINS = cm sm sma sma_multi -INSTALLTOOLS = $(BINS) - +# macOS needs c++14 standard when compiling c++ ifeq ($(platform),Darwin) MYCXXFLAGS = -std=c++14 endif -include ../../Makefile.host - -# checking platform can be done only after 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 MYCFLAGS += -D_ISOC99_SOURCE endif + cm : $(OBJDIR)/cm.o $(MYOBJS) sm : $(OBJDIR)/sm.o $(MYOBJS) sma : $(OBJDIR)/sma.o $(MYOBJS)