1 # include the platform_macosx_*.GNU based on the detected MacOS version
3 MACOS_RELEASE_VERSION=$(shell sw_vers -productVersion)
4 MACOS_REL_WORDS := $(subst ., ,${MACOS_RELEASE_VERSION})
5 MACOS_MAJOR_VERSION = $(word 1,${MACOS_REL_WORDS})
6 MACOS_MINOR_VERSION = $(word 2,${MACOS_REL_WORDS})
7 MACOS_BUILD_VERSION = $(word 3,${MACOS_REL_WORDS})
9 MACOS_CODENAME_VER_10_2 :=
10 MACOS_CODENAME_VER_10_3 := panther
11 MACOS_CODENAME_VER_10_4 := tiger
12 MACOS_CODENAME_VER_10_5 := leopard
13 MACOS_CODENAME_VER_10_6 := snowleopard
14 MACOS_CODENAME_VER_10_7 := lion
15 MACOS_CODENAME_VER_10_8 := mountainlion
16 MACOS_CODENAME_VER_10_9 := mavericks
17 MACOS_CODENAME_VER_10_10 := yosemite
18 MACOS_CODENAME_VER_10_11 := elcapitan
19 MACOS_CODENAME_VER_10_12 := sierra
20 MACOS_CODENAME_VER_10_13 := highsierra
21 MACOS_CODENAME_VER_10_14 := mojave
22 MACOS_CODENAME_VER_10_latest := mojave
23 MACOS_CODENAME_VER_11_0 := bigsur
24 MACOS_CODENAME_VER_11_1 := bigsur
25 MACOS_CODENAME_VER_11_2 := bigsur
26 MACOS_CODENAME_VER_11_latest := bigsur
27 MACOS_CODENAME_VER_12_0 := monterey
28 MACOS_CODENAME_VER_12_latest := monterey
30 MACOS_CODENAME = $(MACOS_CODENAME_VER_$(MACOS_MAJOR_VERSION)_$(MACOS_MINOR_VERSION))
32 ifeq ($(MACOS_MAJOR_VERSION),10)
33 ifeq ($(shell test $(MACOS_MINOR_VERSION) -gt 14; echo $$?),0)
34 ## if the detected version is greater than the latest know version,
35 ## just use the latest known version
36 MACOS_CODENAME = $(MACOS_CODENAME_VER_10_latest)
37 else ifeq ($(shell test $(MACOS_MINOR_VERSION) -lt 2; echo $$?),0)
38 ## Unsupported minor version
39 $(error Unsupported MacOS version $(MACOS_RELEASE_VERSION))
41 else ifeq ($(MACOS_MAJOR_VERSION),11)
42 ifeq ($(shell test $(MACOS_MINOR_VERSION) -gt 2; echo $$?),0)
43 ## if the detected version is greater than the latest know version,
44 ## just use the latest known version
45 MACOS_CODENAME = $(MACOS_CODENAME_VER_11_latest)
47 else ifeq ($(MACOS_MAJOR_VERSION),12)
48 ifeq ($(shell test $(MACOS_MINOR_VERSION) -gt 0; echo $$?),0)
49 ## if the detected version is greater than the latest know version,
50 ## just use the latest known version
51 MACOS_CODENAME = $(MACOS_CODENAME_VER_12_latest)
54 ## Unsupported major version -- will fallback to the last known version.
55 MACOS_CODENAME = $(MACOS_CODENAME_VER_12_latest)
58 include $(ACE_ROOT)/include/makeinclude/platform_macosx_$(MACOS_CODENAME).GNU