Fix Makefile for MacBook Intel

This commit is contained in:
Georgi Gerganov 2022-10-08 17:35:55 +03:00
parent 2ca8cc77b2
commit 5e563ef635

View File

@ -6,7 +6,7 @@ UNAME_M := $(shell uname -m)
# Compile flags # Compile flags
# #
CFLAGS = -O3 -std=c11 CFLAGS = -O3 -std=c11
CXXFLAGS = -O3 -std=c++11 CXXFLAGS = -O3 -std=c++11
CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-unused-function CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-unused-function
@ -24,15 +24,16 @@ ifeq ($(UNAME_S),Darwin)
endif endif
# Architecture specific # Architecture specific
ifeq ($(UNAME_P),x86_64) # TODO: probably these flags need to be tweaked on some architectures
ifeq ($(UNAME_M),x86_64)
CFLAGS += -mavx -mavx2 -mfma -mf16c CFLAGS += -mavx -mavx2 -mfma -mf16c
endif endif
ifneq ($(filter arm%,$(UNAME_P)),) ifneq ($(filter arm%,$(UNAME_M)),)
# Mac M1 # Mac M1
endif endif
ifneq ($(filter aarch64%,$(UNAME_P)),) ifneq ($(filter aarch64%,$(UNAME_M)),)
endif endif
ifneq ($(filter armv6%,$(UNAME_M)),) ifneq ($(filter armv6%,$(UNAME_M)),)
# Raspberry Pi 1, 2, 3 # Raspberry Pi 1, 2, 3
CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access
endif endif