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})
10 MACOS_CODENAME_VER_10_2 :=
11 MACOS_CODENAME_VER_10_3 := panther
12 MACOS_CODENAME_VER_10_4 := tiger
13 MACOS_CODENAME_VER_10_5 := leopard
14 MACOS_CODENAME_VER_10_6 := snowleopard
15 MACOS_CODENAME_VER_10_7 := lion
16 MACOS_CODENAME_VER_10_8 := mountainlion
17 MACOS_CODENAME_VER_10_9 := mavericks
18 MACOS_CODENAME_VER_10_10 := yosemite
19 MACOS_CODENAME_VER_10_11 := elcapitan
20 MACOS_CODENAME_VER_10_12 := sierra
21 MACOS_CODENAME_VER_10_13 := highsierra
22 MACOS_CODENAME_VER_10_14 := mojave
23 MACOS_CODENAME_VER_10_15 := catalina
24 MACOS_CODENAME_VER_10_latest := catalina
25 MACOS_CODENAME_VER_11_5 := bigsur
26 MACOS_CODENAME_VER_11_latest := bigsur
27 MACOS_CODENAME_VER_12_3 := 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 15; 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 3; 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
55 $(error Unsupported MacOS version $(MACOS_RELEASE_VERSION))
58 include $(ACE_ROOT)/include/makeinclude/platform_macosx_$(MACOS_CODENAME).GNU