#
# Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 LucĂa Andrea Illanes Albornoz <lucia@luciaillanes.de>
#
# WARNING: Do _NOT_ use whitespaces (` ') or tab (` ')
# characters in any of the variables below save for MAKEFLAGS,
# PATH, and TIMESTAMP_FMT.
#
# ${PREFIX_{CROSS,MINGW32,MINIPIX,NATIVE,RPM}} and ${BUILD_WORKDIR}
# must be immediately beneath ${PREFIX}. ${PREFIX} must be o+rwx.
# The variables mentioned should not be forward slash-terminated.
#
#
# Default toolchain flags & variables
: ${DEFAULT_BUILD_CPUS:=};
: ${DEFAULT_BUILD_TYPE:=native};
#
# Default C compiler flags & variables
: ${DEFAULT_CFLAGS_DEBUG:="-D_REDIR_TIME64=0 -g2 -O0"};
: ${DEFAULT_CFLAGS_DEBUG_HOST:="-D_REDIR_TIME64=0 -g0 -O2"};
: ${DEFAULT_CFLAGS_DEBUG_RUNTIME:="-D_REDIR_TIME64=0 -g3 -O0"};
: ${DEFAULT_CFLAGS_RELEASE:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CFLAGS_RELEASE_HOST:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CFLAGS_RELEASE_RUNTIME:="-D_REDIR_TIME64=0 -g0 -O0"};
rtl_get_var_unsafe \$DEFAULT_CFLAGS -u "DEFAULT_CFLAGS_${BUILD_KIND}";
: ${DEFAULT_CFLAGS_CONFIGURE:=${DEFAULT_CFLAGS}};
rtl_get_var_unsafe \$DEFAULT_CFLAGS_HOST -u "DEFAULT_CFLAGS_${BUILD_KIND}_HOST";
rtl_get_var_unsafe \$DEFAULT_CFLAGS_RUNTIME -u "DEFAULT_CFLAGS_${BUILD_KIND}_RUNTIME";
#
# Default C preprocessor flags & variables
: ${DEFAULT_CPPFLAGS_DEBUG:="-D_REDIR_TIME64=0 -g2 -O0"};
: ${DEFAULT_CPPFLAGS_DEBUG_HOST:="-D_REDIR_TIME64=0 -g0 -O2"};
: ${DEFAULT_CPPFLAGS_DEBUG_RUNTIME:="-D_REDIR_TIME64=0 -g3 -O0"};
: ${DEFAULT_CPPFLAGS_RELEASE:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CPPFLAGS_RELEASE_HOST:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CPPFLAGS_RELEASE_RUNTIME:="-D_REDIR_TIME64=0 -g0 -O0"};
rtl_get_var_unsafe \$DEFAULT_CPPFLAGS -u "DEFAULT_CPPFLAGS_${BUILD_KIND}";
: ${DEFAULT_CPPFLAGS_CONFIGURE:=${DEFAULT_CPPFLAGS}};
rtl_get_var_unsafe \$DEFAULT_CPPFLAGS_HOST -u "DEFAULT_CPPFLAGS_${BUILD_KIND}_HOST";
rtl_get_var_unsafe \$DEFAULT_CPPFLAGS_RUNTIME -u "DEFAULT_CPPFLAGS_${BUILD_KIND}_RUNTIME";
#
# Default C++ compiler flags & variables
: ${DEFAULT_CXXFLAGS_DEBUG:="-D_REDIR_TIME64=0 -g2 -O0"};
: ${DEFAULT_CXXFLAGS_DEBUG_HOST:="-D_REDIR_TIME64=0 -g0 -O2"};
: ${DEFAULT_CXXFLAGS_DEBUG_RUNTIME:="-D_REDIR_TIME64=0 -g3 -O0"};
: ${DEFAULT_CXXFLAGS_RELEASE:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CXXFLAGS_RELEASE_HOST:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CXXFLAGS_RELEASE_RUNTIME:="-D_REDIR_TIME64=0 -g0 -O0"};
rtl_get_var_unsafe \$DEFAULT_CXXFLAGS -u "DEFAULT_CXXFLAGS_${BUILD_KIND}";
: ${DEFAULT_CXXFLAGS_CONFIGURE:=${DEFAULT_CXXFLAGS}};
rtl_get_var_unsafe \$DEFAULT_CXXFLAGS_HOST -u "DEFAULT_CXXFLAGS_${BUILD_KIND}_HOST";
rtl_get_var_unsafe \$DEFAULT_CXXFLAGS_RUNTIME -u "DEFAULT_CXXFLAGS_${BUILD_KIND}_RUNTIME";
#
# Default linker flags & variables
: ${DEFAULT_LDFLAGS_DEBUG:=""};
: ${DEFAULT_LDFLAGS_DEBUG_HOST:=""};
: ${DEFAULT_LDFLAGS_DEBUG_RUNTIME:=""};
: ${DEFAULT_LDFLAGS_RELEASE:=""};
: ${DEFAULT_LDFLAGS_RELEASE_HOST:=""};
: ${DEFAULT_LDFLAGS_RELEASE_RUNTIME:=""};
rtl_get_var_unsafe \$DEFAULT_LDFLAGS -u "DEFAULT_LDFLAGS_${BUILD_KIND}";
: ${DEFAULT_LDFLAGS_CONFIGURE:=${DEFAULT_LDFLAGS}};
rtl_get_var_unsafe \$DEFAULT_LDFLAGS_HOST -u "DEFAULT_LDFLAGS_${BUILD_KIND}_HOST";
rtl_get_var_unsafe \$DEFAULT_LDFLAGS_RUNTIME -u "DEFAULT_LDFLAGS_${BUILD_KIND}_RUNTIME";
# vim:filetype=sh textwidth=0