mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix MAC_OS_X_VERSION_MIN_REQUIRED for macOS 10.10 and later
Manually specifying MACOSX_VERSION_MIN=10.10 or later would use the wrong value for MAC_OS_X_VERSION_MIN_REQUIRED define. 1100 instead of 101000.
This commit is contained in:
parent
3f29b8558d
commit
d4e7d987a3
1 changed files with 9 additions and 2 deletions
11
Makefile
11
Makefile
|
@ -426,8 +426,15 @@ ifeq ($(PLATFORM),darwin)
|
||||||
MACOSX_VERSION_MIN=10.7
|
MACOSX_VERSION_MIN=10.7
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Multiply by 100 and then remove decimal. 10.7 -> 1070.0 -> 1070
|
MACOSX_MAJOR=$(shell echo $(MACOSX_VERSION_MIN) | cut -d. -f1)
|
||||||
MAC_OS_X_VERSION_MIN_REQUIRED=$(shell echo '$(MACOSX_VERSION_MIN) * 100' | bc | cut -d. -f1)
|
MACOSX_MINOR=$(shell echo $(MACOSX_VERSION_MIN) | cut -d. -f2)
|
||||||
|
ifeq ($(shell test $(MACOSX_MINOR) -gt 9; echo $$?),0)
|
||||||
|
# Multiply and then remove decimal. 10.10 -> 101000.0 -> 101000
|
||||||
|
MAC_OS_X_VERSION_MIN_REQUIRED=$(shell echo "$(MACOSX_MAJOR) * 10000 + $(MACOSX_MINOR) * 100" | bc | cut -d. -f1)
|
||||||
|
else
|
||||||
|
# Multiply by 100 and then remove decimal. 10.7 -> 1070.0 -> 1070
|
||||||
|
MAC_OS_X_VERSION_MIN_REQUIRED=$(shell echo "$(MACOSX_VERSION_MIN) * 100" | bc | cut -d. -f1)
|
||||||
|
endif
|
||||||
|
|
||||||
LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
|
LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
|
||||||
BASE_CFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) \
|
BASE_CFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) \
|
||||||
|
|
Loading…
Reference in a new issue