diff options
-rw-r--r-- | doc/HowToBuild.html | 9 | ||||
-rwxr-xr-x | make/gluegen-cpptasks-base.xml | 25 | ||||
-rw-r--r-- | make/scripts/make.macosx.jdk_lipo_libs.sh | 13 |
3 files changed, 43 insertions, 4 deletions
diff --git a/doc/HowToBuild.html b/doc/HowToBuild.html index 5265ac3..89a5a89 100644 --- a/doc/HowToBuild.html +++ b/doc/HowToBuild.html @@ -137,14 +137,19 @@ apt-get install kernel-package build-essential </li> <li> <b>MacOS and iOS</b> x86_64 and aarch64 <ul> + <li><a href="http://www.apple.com/macosx/">Mac OS</a> 12.6.5</li> + <li><a href="http://developer.apple.com/technologies/xcode.html">Xcode</a> 14.2 for clang, etc (included in MacOS)</li> + <li>MacOS SDK 11.3 from a previous XCode version or <a href="https://github.com/phracker/MacOSX-SDKs">from this alternative site</a> + <ul> + <li><i>export SDKROOT=macosx11.3</i></li> + <li>We use <i>-mmacosx-version-min=10.5</i> deployment target in general.</li> + </ul></li> <li>git ≥ 2.37 provided by Xcode ≥ 14</li> <li>awk is provided by MacOS</li> <li><a href="https://cmake.org/">CMake 3.25.1</a>, and install the <a href="https://stackoverflow.com/questions/30668601/installing-cmake-command-line-tools-on-a-mac">command line tools</a> <ul> <li>Install symlinks to <i>/usr/local/bin</i>, run: <i>sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install</i></li> </ul></li> - <li><a href="http://www.apple.com/macosx/">Mac OS</a> 11 or later (note: may not work with earlier releases) </li> - <li><a href="http://developer.apple.com/technologies/xcode.html">Xcode</a> 14 or later for clang, etc (included in MacOS)</li> <li><a href="https://7-zip.org/">7-Zip 21.07</a> x86_64 and arm64 version</li> </ul> Prepare fat universal OpenJDK libraries diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml index 33d9c9f..8cac554 100755 --- a/make/gluegen-cpptasks-base.xml +++ b/make/gluegen-cpptasks-base.xml @@ -1220,8 +1220,29 @@ </defineset> </compiler> - <!-- MacOSX compiler configuration --> + <!-- + MacOSX compiler configuration. + + 2023-05-04 Actively supported architectures are 'x86_64' and 'arm64'. + + XCode 14.2 on a MacOS 12.6.5 x86_64 (mac-mini) machine + using MacOS SDK 11.3 is capable to produce fat-lipo code + for MacOS >= 10.5 lipo libs covering 'x86_64' and 'arm64'. + The MacOS SDK 11.3 has been re-added from a previous XCode installation. + However, alternative source is <https://github.com/phracker/MacOSX-SDKs>. + Only for using C++ and hence the C++ STL, + the minimum version is 10.7 due to clang++ libc++. + This is currently the case for JOAL's bundled openal-soft, + as well as for JOGL's optional oculusvr-sdk (disabled). + + The official JogAmp build uses + - `export SDKROOT=macosx11.3` (environment variable) + - `java.lib.dir.platform=/Users/jogamp/temurin-17.jdk.fat.lib` (file ~/gluegen.properties) + - generated by `make/scripts/make.macosx.jdk_lipo_libs.sh` + + Sync with doc/HowToBuild.html + --> <compiler id="compiler.cfg.macosx" name="${gcc.compat.compiler}"> <!-- Note: Apple doesn't seem to provide ppc binaries on Snow Leopard --> <compilerarg value="-arch" if="use.macosppc"/> @@ -1235,7 +1256,7 @@ <!-- Note: Apple doesn't seem to provide ppc64 binaries on Leopard --> <compilerarg value="-Wmost" /> <compilerarg value="-ObjC" /> - <compilerarg value="-mmacosx-version-min=11.0"/> + <compilerarg value="-mmacosx-version-min=10.5"/> <!-- sysincludepath path="${macosx.sdkroot}" if="macosx.sdkroot"/ --> <defineset> <define name="_DEBUG" if="c.compiler.use-debug"/> diff --git a/make/scripts/make.macosx.jdk_lipo_libs.sh b/make/scripts/make.macosx.jdk_lipo_libs.sh index 3dcb9ab..5619bc5 100644 --- a/make/scripts/make.macosx.jdk_lipo_libs.sh +++ b/make/scripts/make.macosx.jdk_lipo_libs.sh @@ -1,5 +1,18 @@ #! /bin/sh +# +# First unpack the OpenJDK (Temurin) package +# for amd64 and arm64. +# Then copy each lib-folder 'temurin-xy.jdk/Contents/Home/lib/' +# to their respective target lib-folder: +# - temurin-xy.jdk.amd64.lib/ +# - temurin-xy.jdk.arm64.lib/ +# +# Now we can run this script producing fat lipo dylib files, +# placed into +# - temurin-xy.jdk.fat.lib +# + amd64_dir=$HOME/temurin-17.jdk.amd64.lib arm64_dir=$HOME/temurin-17.jdk.arm64.lib fat_dir=$HOME/temurin-17.jdk.fat.lib |