OXYGENHUB
◆ main openmsx / build / platform-darwin.mk
1.4 KiB · Makefile · last changed chore(): initial commit 1 month ago source blame history raw
1
# Configuration for creating a Darwin app folder.
2
# In practice, this is used for Mac OS X; I'm not sure all of it applies to
3
# other Darwin-based systems.
4
5
# Does platform support symlinks?
6
USE_SYMLINK:=true
7
8
# The app folder will set a hi-res icon, so the openMSX process should not
9
# replace this with its own low-res icon.
10
SET_WINDOW_ICON:=false
11
12
ifeq ($(OPENMSX_TARGET_CPU),aarch64)
13
TARGET_FLAGS+=-arch arm64
14
else
15
TARGET_FLAGS+=-arch $(OPENMSX_TARGET_CPU)
16
endif
17
18
# File name extension of executables.
19
EXEEXT:=
20
LIBRARYEXT:=.so
21
22
# Select the OS X version we want to be compatible with.
23
# In theory it is possible to compile against an OS X version number lower
24
# than the SDK version number, but in practice this doesn't seem to work
25
# since libraries such as libxml2 can change soname between OS X versions.
26
# Clang as shipped with Xcode requires OS X 10.7 or higher for compiling with
27
# libc++, when compiling Clang and libc++ from source 10.6 works as well.
28
#
29
# Version 13.3 required for std::format
30
OSX_VER:=13.3
31
TARGET_FLAGS+=-mmacosx-version-min=$(OSX_VER)
32
33
# Select Clang as the compiler and libc++ as the standard library.
34
CXX:=clang++
35
TARGET_FLAGS+=-stdlib=libc++
36
37
# Enable automatic reference counting in Objective-C
38
ifneq ($(3RDPARTY_FLAG),true)
39
TARGET_FLAGS+=-fobjc-arc
40
endif
41
42
# Link against system frameworks.
43
LINK_FLAGS+= \
44
	-framework CoreFoundation -framework CoreServices \
45
	-framework ApplicationServices -framework CoreMIDI \
46
	-framework Foundation