Skip to content

Commit 5e563ef

Browse files
committed
Fix Makefile for MacBook Intel
1 parent 2ca8cc7 commit 5e563ef

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ UNAME_M := $(shell uname -m)
66
# Compile flags
77
#
88

9-
CFLAGS = -O3 -std=c11
9+
CFLAGS = -O3 -std=c11
1010
CXXFLAGS = -O3 -std=c++11
1111

1212
CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-unused-function
@@ -24,15 +24,16 @@ ifeq ($(UNAME_S),Darwin)
2424
endif
2525

2626
# Architecture specific
27-
ifeq ($(UNAME_P),x86_64)
27+
# TODO: probably these flags need to be tweaked on some architectures
28+
ifeq ($(UNAME_M),x86_64)
2829
CFLAGS += -mavx -mavx2 -mfma -mf16c
2930
endif
30-
ifneq ($(filter arm%,$(UNAME_P)),)
31+
ifneq ($(filter arm%,$(UNAME_M)),)
3132
# Mac M1
3233
endif
33-
ifneq ($(filter aarch64%,$(UNAME_P)),)
34-
endif
35-
ifneq ($(filter armv6%,$(UNAME_M)),)
34+
ifneq ($(filter aarch64%,$(UNAME_M)),)
35+
endif
36+
ifneq ($(filter armv6%,$(UNAME_M)),)
3637
# Raspberry Pi 1, 2, 3
3738
CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access
3839
endif

0 commit comments

Comments
 (0)