Add support mac m1 and fix homebrew paths

In new Macbooks, homebrew has the /opt/homebrew patch, not /usr/local/
This commit is contained in:
Anatolii Cherednichenko 2022-08-30 00:57:46 +03:00 committed by GitHub
parent 36eddd48c3
commit 3ddb370718
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,13 @@
ARCH_TARGET ?= $(shell uname -m)
# root directory holding homebrew
BREWROOT = /usr/local
ifeq ($(ARCH_TARGET),arm64)
BREWROOT = /opt/homebrew
endif
ifeq ($(ARCH_TARGET),amd64)
BREWROOT = /usr/local
endif
BOOSTROOT = ${BREWROOT}/opt/boost
SSLROOT = ${BREWROOT}/opt/openssl@1.1
UPNPROOT = ${BREWROOT}/opt/miniupnpc
@ -34,8 +42,12 @@ endif
# http://www.hutsby.net/2011/08/macs-with-aes-ni.html
# Seems like all recent Mac's have AES-NI, after firmware upgrade 2.2
# Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic
ifeq ($(USE_AESNI),yes)
CXXFLAGS += -D__AES__ -maes
ifeq ($(ARCH_TARGET),amd64)
ifeq ($(USE_AESNI),yes)
CXXFLAGS += -D__AES__ -maes
else
CXXFLAGS += -msse
endif
endif
install: all