Migrating to using Toolchains compilers.

This commit is contained in:
Scott Duensing 2023-11-07 21:25:51 -06:00
parent 642742a1c8
commit 6802761e49
5 changed files with 27 additions and 124 deletions

View file

@ -33,6 +33,7 @@ function buildAll() {
local TOOLCHAIN= local TOOLCHAIN=
local COMMON= local COMMON=
local CROSS_OS= local CROSS_OS=
local OSXCROSS_LOCATION=
case "${OS}" in case "${OS}" in
@ -49,6 +50,27 @@ function buildAll() {
CROSS_OS="linux" CROSS_OS="linux"
;; ;;
macos)
case "${ARCH}" in
aarch64)
TRIPLE="aarch64-apple-darwin22.4"
OSXCROSS_LOCATION=${G_BUILDROOT}/../toolchains/x-tools/aarch64-macos-apple
;;
x86)
TRIPLE="i386-apple-darwin17"
OSXCROSS_LOCATION=${G_BUILDROOT}/../toolchains/x-tools/x86_64-macos-apple
;;
x86_64)
TRIPLE="x86_64-apple-darwin17"
OSXCROSS_LOCATION=${G_BUILDROOT}/../toolchains/x-tools/x86_64-macos-apple
;;
esac
CROSS_OS="darwin"
source <("${OSXCROSS_LOCATION}/bin/osxcross-conf" 2>/dev/null)
export OSXCROSS_LOCATION
;;
windows) windows)
case "${ARCH}" in case "${ARCH}" in
x86) x86)
@ -66,7 +88,7 @@ function buildAll() {
G_TARGET=${G_BUILDROOT}/build/${OS}/${ARCH} G_TARGET=${G_BUILDROOT}/build/${OS}/${ARCH}
G_GENERATED=${G_TARGET}/generated G_GENERATED=${G_TARGET}/generated
TOOLCHAIN=${G_BUILDROOT}/cmake/${TRIPLE}.cmake TOOLCHAIN=${G_BUILDROOT}/../toolchains/cmake/${TRIPLE}.cmake
COMMON="-DCMAKE_INSTALL_PREFIX=${G_TARGET} -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}" COMMON="-DCMAKE_INSTALL_PREFIX=${G_TARGET} -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}"
# Add CMAKE_BUILD_TYPE to COMMON # Add CMAKE_BUILD_TYPE to COMMON
@ -387,6 +409,9 @@ function outputLicense() {
#buildAll linux x86 #buildAll linux x86
buildAll linux x86_64 #buildAll linux x86_64
buildAll macos aarch64
#buildAll macos x86 #***TODO*** Needs older SDL2
#buildAll macos x86_64 #***TODO*** Needs older SDL2
#buildAll windows x86 #buildAll windows x86
#buildAll windows x86_64 #buildAll windows x86_64

View file

@ -1,30 +0,0 @@
#
# Singe 2
# Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licens
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR i686)
set(CMAKE_C_COMPILER i686-linux-gnu-gcc)
set(CMAKE_C_FLAGS -m32)
set(CMAKE_CXX_COMPILER i686-linux-gnu-g++)
set(CMAKE_CXX_FLAGS -m32)
set(KANGAROO_OS linux)
set(KANGAROO_ARCH x86)

View file

@ -1,35 +0,0 @@
#
# Singe 2
# Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licens
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR i686)
set(triple i686-w64-mingw32)
set(CMAKE_C_COMPILER i686-w64-mingw32-gcc-10-posix)
set(CMAKE_C_COMPILER_TARGET ${triple})
set(CMAKE_CXX_COMPILER i686-w64-mingw32-c++-posix)
set(CMAKE_CXX_COMPILER_TARGET ${triple})
set(CMAKE_C_FLAGS -m32)
set(CMAKE_CXX_FLAGS -m32)
set(KANGAROO_OS windows)
set(KANGAROO_ARCH x86)

View file

@ -1,25 +0,0 @@
#
# Singe 2
# Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licens
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(KANGAROO_OS linux)
set(KANGAROO_ARCH x86_64)

View file

@ -1,32 +0,0 @@
#
# Singe 2
# Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licens
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(triple x86_64-w64-mingw32)
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc-10-posix)
set(CMAKE_C_COMPILER_TARGET ${triple})
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-c++-posix)
set(CMAKE_CXX_COMPILER_TARGET ${triple})
set(KANGAROO_OS windows)
set(KANGAROO_ARCH x86_64)