ci: Add the targets/ subdirectory to facilitate cross-platform testing
Considering that a non-trivial amount of libpng code is arch-specific,
we should perform cross-platform builds (with cross-platform toolchains)
and test runs (on emulated architectures) in our routine verification.
The content of ci/targets/ shall consist of target description files,
written in the standard shell language. These files may be source'd as
needed, before running the verification scripts ci/ci_verify_*.sh.
Here is the initial list of target systems:
Android, Cygwin, FreeBSD, Linux, MSDOS, Windows.
And here is the initial list of target architectures:
ARM, MIPS, PowerPC, RISC-V, x86.
diff --git a/ci/targets/android/ci_env.aarch64-linux-android.sh b/ci/targets/android/ci_env.aarch64-linux-android.sh
new file mode 100644
index 0000000..fef0ef1
--- /dev/null
+++ b/ci/targets/android/ci_env.aarch64-linux-android.sh
@@ -0,0 +1,16 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=aarch64
+export CI_TARGET_ARCHVER=aarch64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=android
+export CI_TARGET_ABIVER=android29
+
+export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
diff --git a/ci/targets/android/ci_env.armv7a-linux-androideabi.sh b/ci/targets/android/ci_env.armv7a-linux-androideabi.sh
new file mode 100644
index 0000000..c27bd12
--- /dev/null
+++ b/ci/targets/android/ci_env.armv7a-linux-androideabi.sh
@@ -0,0 +1,16 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=arm
+export CI_TARGET_ARCHVER=armv7a
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=androideabi
+export CI_TARGET_ABIVER=androideabi29
+
+export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
diff --git a/ci/targets/android/ci_env.i686-linux-android.sh b/ci/targets/android/ci_env.i686-linux-android.sh
new file mode 100644
index 0000000..88e3690
--- /dev/null
+++ b/ci/targets/android/ci_env.i686-linux-android.sh
@@ -0,0 +1,16 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_ARCHVER=i686
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=android
+export CI_TARGET_ABIVER=android29
+
+export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
diff --git a/ci/targets/android/ci_env.x86_64-linux-android.sh b/ci/targets/android/ci_env.x86_64-linux-android.sh
new file mode 100644
index 0000000..87460c8
--- /dev/null
+++ b/ci/targets/android/ci_env.x86_64-linux-android.sh
@@ -0,0 +1,16 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_ARCHVER=x86_64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=android
+export CI_TARGET_ABIVER=android29
+
+export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
diff --git a/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh b/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh
new file mode 100644
index 0000000..66b9999
--- /dev/null
+++ b/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=cygwin
+
+export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=CYGWIN
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh b/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh
new file mode 100644
index 0000000..78f8c25
--- /dev/null
+++ b/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=cygwin
+
+export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=CYGWIN
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/darwin/ci_env.arm64-apple-darwin.sh b/ci/targets/darwin/ci_env.arm64-apple-darwin.sh
new file mode 100644
index 0000000..c54d8c7
--- /dev/null
+++ b/ci/targets/darwin/ci_env.arm64-apple-darwin.sh
@@ -0,0 +1,15 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=arm64
+export CI_TARGET_SYSTEM=darwin
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Darwin
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+ -DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh b/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh
new file mode 100644
index 0000000..ee87711
--- /dev/null
+++ b/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh
@@ -0,0 +1,15 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=darwin
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Darwin
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+ -DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh b/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh
new file mode 100644
index 0000000..42235de
--- /dev/null
+++ b/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh
@@ -0,0 +1,14 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=aarch64
+export CI_TARGET_SYSTEM=freebsd
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=FreeBSD
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh b/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh
new file mode 100644
index 0000000..3d188f8
--- /dev/null
+++ b/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh
@@ -0,0 +1,14 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=freebsd
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=FreeBSD
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh b/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh
new file mode 100644
index 0000000..0a02cde
--- /dev/null
+++ b/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh
@@ -0,0 +1,14 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=riscv64
+export CI_TARGET_SYSTEM=freebsd
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=FreeBSD
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh b/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh
new file mode 100644
index 0000000..c77ace5
--- /dev/null
+++ b/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh
@@ -0,0 +1,14 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=freebsd
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=FreeBSD
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.aarch64-linux-gnu.sh b/ci/targets/linux/ci_env.aarch64-linux-gnu.sh
new file mode 100644
index 0000000..cb85bc6
--- /dev/null
+++ b/ci/targets/linux/ci_env.aarch64-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=aarch64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.arm-linux-gnueabi.sh b/ci/targets/linux/ci_env.arm-linux-gnueabi.sh
new file mode 100644
index 0000000..45504df
--- /dev/null
+++ b/ci/targets/linux/ci_env.arm-linux-gnueabi.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=arm
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnueabi
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh b/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh
new file mode 100644
index 0000000..3eb9d18
--- /dev/null
+++ b/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=arm
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnueabihf
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.i686-linux-gnu.sh b/ci/targets/linux/ci_env.i686-linux-gnu.sh
new file mode 100644
index 0000000..a5efd9f
--- /dev/null
+++ b/ci/targets/linux/ci_env.i686-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.mips-linux-gnu.sh b/ci/targets/linux/ci_env.mips-linux-gnu.sh
new file mode 100644
index 0000000..532c93c
--- /dev/null
+++ b/ci/targets/linux/ci_env.mips-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mips
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh b/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh
new file mode 100644
index 0000000..348d2b8
--- /dev/null
+++ b/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mips64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnuabi64
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh b/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh
new file mode 100644
index 0000000..e264913
--- /dev/null
+++ b/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mips64el
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnuabi64
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.mipsel-linux-gnu.sh b/ci/targets/linux/ci_env.mipsel-linux-gnu.sh
new file mode 100644
index 0000000..f99050f
--- /dev/null
+++ b/ci/targets/linux/ci_env.mipsel-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsel
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh b/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh
new file mode 100644
index 0000000..0a32867
--- /dev/null
+++ b/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsisa32r6
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh b/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh
new file mode 100644
index 0000000..ca06009
--- /dev/null
+++ b/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsisa32r6el
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh b/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh
new file mode 100644
index 0000000..6c1138f
--- /dev/null
+++ b/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsisa64r6
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnuabi64
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh b/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh
new file mode 100644
index 0000000..f64f2fc
--- /dev/null
+++ b/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsisa64r6el
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnuabi64
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.powerpc-linux-gnu.sh b/ci/targets/linux/ci_env.powerpc-linux-gnu.sh
new file mode 100644
index 0000000..e50d9b5
--- /dev/null
+++ b/ci/targets/linux/ci_env.powerpc-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=powerpc
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh b/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh
new file mode 100644
index 0000000..15e60ad
--- /dev/null
+++ b/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=powerpc64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh b/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh
new file mode 100644
index 0000000..be0e2ca
--- /dev/null
+++ b/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=powerpc64le
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.riscv64-linux-gnu.sh b/ci/targets/linux/ci_env.riscv64-linux-gnu.sh
new file mode 100644
index 0000000..d8518d9
--- /dev/null
+++ b/ci/targets/linux/ci_env.riscv64-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=riscv64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/linux/ci_env.x86_64-linux-gnu.sh b/ci/targets/linux/ci_env.x86_64-linux-gnu.sh
new file mode 100644
index 0000000..3263fbf
--- /dev/null
+++ b/ci/targets/linux/ci_env.x86_64-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh b/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh
new file mode 100644
index 0000000..59f3bd5
--- /dev/null
+++ b/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i386
+export CI_TARGET_SYSTEM=msdoswatcom
+
+export CI_CC="wcl386"
+
+# Open Watcom V2 CMake build
+# https://github.com/open-watcom/open-watcom-v2/discussions/716
+export CI_CMAKE_GENERATOR="Watcom WMake"
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=DOS
+"
diff --git a/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh b/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh
new file mode 100644
index 0000000..63e6d06
--- /dev/null
+++ b/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i586
+export CI_TARGET_SYSTEM=msdosdjgpp
+
+export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Generic
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh b/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh
new file mode 100644
index 0000000..3059f18
--- /dev/null
+++ b/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh
@@ -0,0 +1,19 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i86
+export CI_TARGET_SYSTEM=msdoswatcom
+
+export CI_CC="wcl"
+
+# Open Watcom V2 CMake build
+# https://github.com/open-watcom/open-watcom-v2/discussions/716
+export CI_CMAKE_GENERATOR="Watcom WMake"
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=DOS
+ -DCMAKE_SYSTEM_PROCESSOR=I86
+"
diff --git a/ci/targets/windows/ci_env.aarch64-windows-llvm.sh b/ci/targets/windows/ci_env.aarch64-windows-llvm.sh
new file mode 100644
index 0000000..8024417
--- /dev/null
+++ b/ci/targets/windows/ci_env.aarch64-windows-llvm.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=aarch64
+export CI_TARGET_SYSTEM=windows
+
+export CI_CC="clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/windows/ci_env.i686-w64-mingw32.sh b/ci/targets/windows/ci_env.i686-w64-mingw32.sh
new file mode 100644
index 0000000..8c83d0f
--- /dev/null
+++ b/ci/targets/windows/ci_env.i686-w64-mingw32.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=mingw32
+
+# The output of `uname -s` on MSYS2 is understandable, and so is
+# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.)
+# But aside from that, the Mingw-w64 nomenclature is rather messy.
+export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/windows/ci_env.i686-windows-llvm.sh b/ci/targets/windows/ci_env.i686-windows-llvm.sh
new file mode 100644
index 0000000..3d29f6d
--- /dev/null
+++ b/ci/targets/windows/ci_env.i686-windows-llvm.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=windows
+
+export CI_CC="clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh b/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh
new file mode 100644
index 0000000..67d8355
--- /dev/null
+++ b/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=mingw64
+
+# The output of `uname -s` on MSYS2 is understandable, and so is
+# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.)
+# But aside from that, the Mingw-w64 nomenclature is rather messy.
+export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/ci/targets/windows/ci_env.x86_64-windows-llvm.sh b/ci/targets/windows/ci_env.x86_64-windows-llvm.sh
new file mode 100644
index 0000000..747f99b
--- /dev/null
+++ b/ci/targets/windows/ci_env.x86_64-windows-llvm.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=windows
+
+export CI_CC="clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"