From 03ea6dc708cd6d72800a803bd80556e876afb022 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Wed, 29 Apr 2020 20:44:55 +0300 Subject: [PATCH] Make builds possible without Xcode --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 5c702a1..9236a11 100644 --- a/Makefile +++ b/Makefile @@ -125,6 +125,13 @@ endif ifeq ($(PLATFORM),Darwin) SYSROOT := $(shell xcodebuild -sdk macosx -version Path 2> $(NULL)) +ifeq ($(SYSROOT),) +SYSROOT := $(shell ls /Library/Developer/CommandLineTools/SDKs/ | grep 10 | tail -n 1) +endif +ifeq ($(SYSROOT),) +$(error Could not find a macOS SDK) +endif + CFLAGS += -F/Library/Frameworks -mmacosx-version-min=10.9 OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(SYSROOT) LDFLAGS += -framework AppKit -framework PreferencePanes -framework Carbon -framework QuartzCore -weak_framework Metal -weak_framework MetalKit -mmacosx-version-min=10.9