-
Notifications
You must be signed in to change notification settings - Fork 108
/
Makefile.flags
62 lines (55 loc) · 2.48 KB
/
Makefile.flags
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#############################################################################
# Compilation flags & paths for Mac OS X
#
# These are derived from Xcode v 6.2 for Apple LLVM version 6.0 (clang-600.0.57)
XCODE:=$(shell /usr/bin/xcode-select -p)
XCUB:=$(XCODE)/usr/bin
SDKsDIR:=$(XCODE)/Platforms/MacOSX.platform/Developer/SDKs
#Build oldest installed SDK (must be MacOSX10.12.sdk because of Metal and later)
SDKs:=MacOSX10.12.sdk MacOSX10.13.sdk MacOSX10.14.sdk MacOSX10.15.sdk
SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
ifeq ($(strip $(SDK)),)
$(error could not find a valid SDK)
endif
TARGET_ARCH:=x86_64
TARGET_VERSION_MIN:=10.7
print-sdks:
$(info ---------------- Makefile.flags settings ------------------)
$(info SDKs=$(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
$(info SDK=$(SDK))
$(info -----------------------------------------------------)
# N.B. ARC isn't supported by the os-x 32-bit legacy Objective-C runtime kernel.
# ARC is supported only on 64-bits, and then only for the 10.7 SDK and later.
OBJC_CODE_MODEL := -fobjc-arc
CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 -DUSE_METAL=1 -DUSE_OPENGL=1 -DUSE_CORE_GRAPHICS=1 \
-arch $(TARGET_ARCH) \
-mmacosx-version-min=$(TARGET_VERSION_MIN) -msse4.2 \
-fvisibility=default \
-fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
-fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
$(OBJC_CODE_MODEL) \
$(XCFLAGS) \
-isysroot $(SDK) \
-include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
BFLAGS:=-arch $(TARGET_ARCH) \
-bundle \
-isysroot $(SDK)
DYFLAGS:=-arch $(TARGET_ARCH) \
-shared \
-isysroot $(SDK)
WARNINGS:= -Wno-missing-field-initializers -Wno-missing-prototypes \
-Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function \
-Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value \
-Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow \
-Wno-four-char-constants -Wno-conversion -Wno-constant-conversion \
-Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion \
-Wno-sign-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof \
-Wno-trigraphs -Wdeprecated-declarations
# N.B. No QuickTime framework; that is 32-bit only.
FRAMEWORKS:=-fobjc-link-runtime \
-framework Foundation -framework OpenGL -framework Cocoa \
-framework AudioToolbox -framework CoreAudio \
-framework SystemConfiguration \
-framework ApplicationServices -framework Security \
-framework QuartzCore \
-framework Metal -framework MetalKit