mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-25 00:25:48 +08:00
client Makefile: link with pthread only if needed
This commit is contained in:
parent
f158f347e5
commit
43b69bd4e4
1 changed files with 7 additions and 3 deletions
|
@ -22,13 +22,17 @@ vpath %.dic dictionaries
|
|||
OBJDIR = obj
|
||||
|
||||
LDLIBS ?= -L/usr/local/lib
|
||||
LDLIBS += -lreadline -lpthread -lm
|
||||
LDLIBS += -lreadline -lm
|
||||
|
||||
# RPi Zero gcc requires -latomic
|
||||
# but MacOSX /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
|
||||
# MacOSX /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
|
||||
# doesn't recognize option --as-needed
|
||||
ifneq ($(platform),Darwin)
|
||||
# RPi Zero gcc requires -latomic
|
||||
LDLIBS += -Wl,--as-needed -latomic -Wl,--no-as-needed
|
||||
# Android Termux doesn't have pthread
|
||||
LDLIBS += -Wl,--as-needed -lpthread -Wl,--no-as-needed
|
||||
else
|
||||
LDLIBS += -lpthread
|
||||
endif
|
||||
|
||||
# local libraries
|
||||
|
|
Loading…
Reference in a new issue