742 | | # Handle darwin variants. Newer SDKs allow targeting older |
743 | | # platforms, so use the newest one available. |
744 | | case ${toolchain} in |
745 | | *-darwin*) |
746 | | osx_sdk_dir="$(show_darwin_sdk_path macosx)" |
747 | | if [ -d "${osx_sdk_dir}" ]; then |
748 | | add_cflags "-isysroot ${osx_sdk_dir}" |
749 | | add_ldflags "-isysroot ${osx_sdk_dir}" |
750 | | fi |
751 | | ;; |
752 | | esac |
753 | | |
754 | | case ${toolchain} in |
755 | | *-darwin8-*) |
756 | | add_cflags "-mmacosx-version-min=10.4" |
757 | | add_ldflags "-mmacosx-version-min=10.4" |
758 | | ;; |
759 | | *-darwin9-*) |
760 | | add_cflags "-mmacosx-version-min=10.5" |
761 | | add_ldflags "-mmacosx-version-min=10.5" |
762 | | ;; |
763 | | *-darwin10-*) |
764 | | add_cflags "-mmacosx-version-min=10.6" |
765 | | add_ldflags "-mmacosx-version-min=10.6" |
766 | | ;; |
767 | | *-darwin11-*) |
768 | | add_cflags "-mmacosx-version-min=10.7" |
769 | | add_ldflags "-mmacosx-version-min=10.7" |
770 | | ;; |
771 | | *-darwin12-*) |
772 | | add_cflags "-mmacosx-version-min=10.8" |
773 | | add_ldflags "-mmacosx-version-min=10.8" |
774 | | ;; |
775 | | *-darwin13-*) |
776 | | add_cflags "-mmacosx-version-min=10.9" |
777 | | add_ldflags "-mmacosx-version-min=10.9" |
778 | | ;; |
779 | | *-darwin14-*) |
780 | | add_cflags "-mmacosx-version-min=10.10" |
781 | | add_ldflags "-mmacosx-version-min=10.10" |
782 | | ;; |
783 | | *-iphonesimulator-*) |
784 | | add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" |
785 | | add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}" |
786 | | iossim_sdk_dir="$(show_darwin_sdk_path iphonesimulator)" |
787 | | if [ -d "${iossim_sdk_dir}" ]; then |
788 | | add_cflags "-isysroot ${iossim_sdk_dir}" |
789 | | add_ldflags "-isysroot ${iossim_sdk_dir}" |
790 | | fi |
791 | | ;; |
792 | | esac |
793 | | |