From 10559eb559d306f1ccb67a52d473d1c32a44d17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= Date: Wed, 6 Mar 2024 16:56:22 +0000 Subject: [PATCH] [Imp] build: Makefile: Add explicit CONFIG=macos and provide MACOSX_VERSION_MIN= and ARCH= options. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@20257 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- build/make/config-defaults.mk | 8 +------- build/make/config-macos.mk | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 build/make/config-macos.mk diff --git a/build/make/config-defaults.mk b/build/make/config-defaults.mk index fde70018548..5882876c7cc 100644 --- a/build/make/config-defaults.mk +++ b/build/make/config-defaults.mk @@ -3,13 +3,7 @@ ifeq ($(HOST),unix) ifeq ($(HOST_FLAVOUR),MACOSX) -NO_PULSEAUDIO?=1 -include build/make/config-clang.mk -# Mac OS X overrides -DYNLINK=0 -SHARED_SONAME=0 -MPT_COMPILER_NOSECTIONS=1 -MPT_COMPILER_NOGCSECTIONS=1 +include build/make/config-macos.mk else ifeq ($(HOST_FLAVOUR),MSYS2) diff --git a/build/make/config-macos.mk b/build/make/config-macos.mk new file mode 100644 index 00000000000..1888c0f807a --- /dev/null +++ b/build/make/config-macos.mk @@ -0,0 +1,26 @@ + +NO_PULSEAUDIO?=1 +include build/make/config-clang.mk +# Mac OS X overrides +DYNLINK=0 +SHARED_SONAME=0 +MPT_COMPILER_NOSECTIONS=1 +MPT_COMPILER_NOGCSECTIONS=1 + +# 10.13 .. +ifeq ($(MACOSX_VERSION_MIN),) +else +MPT_OS_MACOSX_OR_IOS +CFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) +CXXFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) +LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) +endif + +# arm64/x86_64/i386 +ifeq ($(ARCH),) +else +CFLAGS += -arch $(ARCH) +CXXFLAGS += -arch $(ARCH) +LDFLAGS += -arch $(ARCH) +endif +