File: platform-darwin.mk

package info (click to toggle)
openmsx 20.0%2Bdfsg-1.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,544 kB
  • sloc: cpp: 236,922; xml: 49,948; tcl: 15,056; python: 5,385; perl: 281; sh: 77; makefile: 53
file content (46 lines) | stat: -rw-r--r-- 1,477 bytes parent folder | download
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
# Configuration for creating a Darwin app folder.
# In practice, this is used for Mac OS X; I'm not sure all of it applies to
# other Darwin-based systems.

# Does platform support symlinks?
USE_SYMLINK:=true

# The app folder will set a hi-res icon, so the openMSX process should not
# replace this with its own low-res icon.
SET_WINDOW_ICON:=false

ifeq ($(OPENMSX_TARGET_CPU),aarch64)
TARGET_FLAGS+=-arch arm64
else
TARGET_FLAGS+=-arch $(OPENMSX_TARGET_CPU)
endif

# File name extension of executables.
EXEEXT:=
LIBRARYEXT:=.so

# Select the OS X version we want to be compatible with.
# In theory it is possible to compile against an OS X version number lower
# than the SDK version number, but in practice this doesn't seem to work
# since libraries such as libxml2 can change soname between OS X versions.
# Clang as shipped with Xcode requires OS X 10.7 or higher for compiling with
# libc++, when compiling Clang and libc++ from source 10.6 works as well.
#
# Version 10.15 required for std::filesystem
OSX_VER:=10.15
TARGET_FLAGS+=-mmacosx-version-min=$(OSX_VER)

# Select Clang as the compiler and libc++ as the standard library.
CXX:=clang++
TARGET_FLAGS+=-stdlib=libc++

# Enable automatic reference counting in Objective-C
ifneq ($(3RDPARTY_FLAG),true)
TARGET_FLAGS+=-fobjc-arc
endif

# Link against system frameworks.
LINK_FLAGS+= \
	-framework CoreFoundation -framework CoreServices \
	-framework ApplicationServices -framework CoreMIDI \
	-framework Foundation