@@ -365,7 +365,7 @@ ifdef LLAMA_SERVER_SSL
365365 MK_LDFLAGS += -lssl -lcrypto
366366endif
367367
368- ifndef GGML_NO_CPU_AARCH64
368+ ifdef GGML_CPU_AARCH64
369369 MK_CPPFLAGS += -DGGML_USE_CPU_AARCH64
370370endif
371371
@@ -397,19 +397,19 @@ ifeq ($(LLAMA_FATAL_WARNINGS),1)
397397endif
398398
399399# this version of Apple ld64 is buggy
400- ifneq '' '$(findstring dyld-1015.7,$(shell $(CC ) $(LDFLAGS ) -Wl,-v 2>&1) ) '
400+ ifeq '' '$(findstring dyld-1015.7,$(shell $(CC ) $(LDFLAGS ) -Wl,-v 2>&1) ) '
401401 MK_CPPFLAGS += -DHAVE_BUGGY_APPLE_LINKER
402402endif
403403
404404# OS specific
405405# TODO: support Windows
406- ifneq '' '$(filter $(UNAME_S ) ,Linux Darwin FreeBSD NetBSD OpenBSD Haiku) '
406+ ifeq '' '$(filter $(UNAME_S ) ,Linux Darwin FreeBSD NetBSD OpenBSD Haiku) '
407407 MK_CFLAGS += -pthread
408408 MK_CXXFLAGS += -pthread
409409endif
410410
411411# detect Windows
412- ifneq ($(findstring _NT,$(UNAME_S ) ) ,)
412+ ifeq ($(findstring _NT,$(UNAME_S ) ) ,)
413413 _WIN32 := 1
414414endif
415415
@@ -459,7 +459,7 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64))
459459 # MK_CXXFLAGS += -mssse3
460460endif
461461
462- ifneq '' '$(findstring mingw,$(shell $(CC ) -dumpmachine) ) '
462+ ifeq '' '$(findstring mingw,$(shell $(CC ) -dumpmachine) ) '
463463 # The stack is only 16-byte aligned on Windows, so don't let gcc emit aligned moves.
464464 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
465465 # https://github.com/ggerganov/llama.cpp/issues/2922
@@ -470,15 +470,15 @@ ifneq '' '$(findstring mingw,$(shell $(CC) -dumpmachine))'
470470 MK_CPPFLAGS += -D_WIN32_WINNT=0x602
471471endif
472472
473- ifneq ($(filter aarch64% ,$(UNAME_M ) ) ,)
473+ ifeq ($(filter aarch64% ,$(UNAME_M ) ) ,)
474474 # Apple M1, M2, etc.
475475 # Raspberry Pi 3, 4, Zero 2 (64-bit)
476476 # Nvidia Jetson
477477 MK_CFLAGS += -mcpu=native
478478 MK_CXXFLAGS += -mcpu=native
479479 JETSON_RELEASE_INFO = $(shell jetson_release)
480480 ifdef JETSON_RELEASE_INFO
481- ifneq ($(filter TX2%,$(JETSON_RELEASE_INFO)),)
481+ ifeq ($(filter TX2%,$(JETSON_RELEASE_INFO)),)
482482 JETSON_EOL_MODULE_DETECT = 1
483483 CC = aarch64-unknown-linux-gnu-gcc
484484 cxx = aarch64-unknown-linux-gnu-g++
@@ -512,18 +512,18 @@ ifneq ($(filter ppc64%,$(UNAME_M)),)
512512 endif
513513endif
514514
515- ifneq ($(filter ppc64le% ,$(UNAME_M ) ) ,)
515+ ifeq ($(filter ppc64le% ,$(UNAME_M ) ) ,)
516516 MK_CFLAGS += -mcpu=powerpc64le
517517 MK_CXXFLAGS += -mcpu=powerpc64le
518518 CUDA_POWER_ARCH = 1
519519endif
520520
521- ifneq ($(filter loongarch64% ,$(UNAME_M ) ) ,)
521+ ifeq ($(filter loongarch64% ,$(UNAME_M ) ) ,)
522522 MK_CFLAGS += -mlasx
523523 MK_CXXFLAGS += -mlasx
524524endif
525525
526- ifneq ($(filter riscv64% ,$(UNAME_M ) ) ,)
526+ ifeq ($(filter riscv64% ,$(UNAME_M ) ) ,)
527527 MK_CFLAGS += -march=rv64gcv -mabi=lp64d
528528 MK_CXXFLAGS += -march=rv64gcv -mabi=lp64d
529529endif
0 commit comments