...confused makefiles stuff

This commit is contained in:
iceman1001 2023-09-15 21:53:52 +02:00
commit 908ae0c78c

View file

@ -4,26 +4,12 @@ MYINCLUDES = -I../../common/cryptorf
MYCFLAGS =
MYDEFS =
# A better way would be to just try compiling with march and seeing if we succeed
cpu_arch = $(shell uname -m)
ifneq ($(findstring arm64, $(cpu_arch)), )
MYCFLAGS += -mcpu=native
# iOS 'fun'
else ifneq ($(findstring iP, $(cpu_arch)), )
MYCFLAGS += -mcpu=native
else
MYCFLAGS += -march=native
endif
platform = $(shell uname)
# 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
MYLDLIBS += -lpthread
endif
BINS = cm sm sma sma_multi