]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
make : add macOS deployment target option (#1839)
authorDidzis Gosko <redacted>
Fri, 9 Feb 2024 15:26:29 +0000 (17:26 +0200)
committerGitHub <redacted>
Fri, 9 Feb 2024 15:26:29 +0000 (17:26 +0200)
Makefile

index 762dc65ea0fadec785b740467c72e8dafe4ce098..284b0f1e9eae6336e4c701dc886809ed3edd633d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,12 @@ CFLAGS   = -I.              -O3 -DNDEBUG -std=c11   -fPIC
 CXXFLAGS = -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC
 LDFLAGS  =
 
+ifdef MACOSX_DEPLOYMENT_TARGET
+       CFLAGS   += -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
+       CXXFLAGS += -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
+       LDFLAGS  += -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
+endif
+
 # clock_gettime came in POSIX.1b (1993)
 # CLOCK_MONOTONIC came in POSIX.1-2001 / SUSv3 as optional
 # posix_memalign came in POSIX.1-2001 / SUSv3