Documentation for MACOSX_DEPLOYMENT_TARGET?

Has MACOSX_DEPLOYMENT_TARGET been deprecated? I do not seem to find any proper documentation of it at apple.com.

Background:

I'm building C-based application(s) and libraries (both Intel and AS) that are distributed compiled/linked to our users.

I would like to update my build machines from 10.15 (Intel) and 11 (AS), to macOS 12 (or even higher, if possible) but I would like to be sure that our users can run the executable and that they can link their code against our libraries (and our object code) also on older versions of macOS.

Ideally I would like to continue to support users on macOS 10.15 on Intel and 11 on AS, but macOS 11 on Intel would also be acceptable.

It seems MACOSX_DEPLOYMENT_TARGET (perhaps combined with SDKROOT) could allow this, but I have not been able to find anything except rumors, i.e. no proper documentation at any Apple site. Testing is not really an option since at least some problems would likely only occur at runtime (e.g. due to weak linking).

I am using the command line tools and GNU make (no Xcode project or some such, also no App Store).

Any pointers would be greatly appreciated!

I found a mention of MACOSX_DEPLOYMENT_TARGET in Xcode's Build Setting Reference.

https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW129

I created a new Mac app project in Xcode 14.2, and the project has a setting for the macOS deployment target, so I think the MACOSX_DEPLOYMENT_TARGET build setting is still used.

@szymczyk thank you for the reference, but unfortunately that link points at a "Retired Document" (which in turn points at a newer page that is also obsolete (for Xcode 11.2) and that page points to https://developer.apple.com/documentation/xcode where MACOSX_DEPLOYMENT_TARGET does not seem to be present).

I found a more direct reference at <https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html> but that documentation, too, "is no longer being updated" and also refers to the newer, useless, documentation site.

So, sofar I've had no luck in finding a current official documentation about how to do command line Makefile build.

Try the good old-fashioned man page for clang:

MACOSX_DEPLOYMENT_TARGET
    If -mmacosx-version-min is unspecified, the default deployment target is read 
    from this environment variable. This option only affects Darwin targets.

Despite this, I will acknowledge that -macosx-version-min has been renamed to -macos-version-min (no x). So even the man page is a little out of date. Still, it should be authoritative.

Finally, you can use otool -l <path_to_binary> to confirm that the minimum OS is defined in the executable or library.

Documentation for MACOSX_DEPLOYMENT_TARGET?
 
 
Q