fix atomic on macOS and all platforms

This commit is contained in:
iceman1001 2023-09-12 20:22:04 +02:00
commit 774f1c33ef

View file

@ -3,7 +3,14 @@ MYSRCS = cryptolib.c util.c
MYINCLUDES = -I../../common/cryptorf
MYCFLAGS =
MYDEFS =
MYLDLIBS = -lpthread -latomic
# Atomic
# RPi Zero gcc requires -latomic
# but MacOSX /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
# doesn't recognize option --as-needed
ifneq ($(platform),Darwin)
MYLDLIBS += -lpthread -Wl,--as-needed -latomic -Wl,--no-as-needed
endif
BINS = cm sm sma sma_multi
INSTALLTOOLS = $(BINS)