From 037e816d3cb3967363fdaad60535fc9a7fa0748e Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Sun, 28 Jul 2019 23:58:37 +0300 Subject: [PATCH] update build scripts --- make-all.sh | 5 +++++ make-bootstrap.sh | 8 ++++++++ make.sh | 13 +++++++++---- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/make-all.sh b/make-all.sh index 5429467..71fc18e 100755 --- a/make-all.sh +++ b/make-all.sh @@ -22,6 +22,9 @@ _host_cpu= _host_target= _host_system= +export CPCFLAGS="$CPCFLAGS" +export CPLFLAGS="$CPLFLAGS" + ###^^^^^^^^^^^### ### Functions ### ###___________### @@ -49,6 +52,8 @@ usage() { echo "Environment variables:" echo " CC C compiler binary" echo " CFLAGS C compiler options" + echo " CPCFLAGS CPC compiler options" + echo " CPLFLAGS CPL linker options" exit 2 } diff --git a/make-bootstrap.sh b/make-bootstrap.sh index 5cc1c61..7a5fe31 100755 --- a/make-bootstrap.sh +++ b/make-bootstrap.sh @@ -11,6 +11,9 @@ _this="$(dirname "$(readlink -f "$0")")" _version="v0.3" _sign=false +export CPCFLAGS="-no-use-time $CPCFLAGS" +export CPLFLAGS="$CPLFLAGS" + ###^^^^^^^^^^^### ### Functions ### ###___________### @@ -20,6 +23,11 @@ usage() { echo "Options:" echo " -v version Set build version" echo " -S Sign build" + echo "Environment variables:" + echo " CC C compiler binary" + echo " CFLAGS C compiler options" + echo " CPCFLAGS CPC compiler options" + echo " CPLFLAGS CPL linker options" exit 2 } diff --git a/make.sh b/make.sh index af287d9..2c0c53b 100755 --- a/make.sh +++ b/make.sh @@ -19,6 +19,9 @@ _out="$_this/bin" _useposix=false +export CPCFLAGS="$CPCFLAGS" +export CPLFLAGS="$CPLFLAGS" + ###^^^^^^^^^^^### ### Functions ### ###___________### @@ -43,6 +46,8 @@ usage() { echo "Environment variables:" echo " CC C compiler binary" echo " CFLAGS C compiler options" + echo " CPCFLAGS CPC compiler options" + echo " CPLFLAGS CPL linker options" exit 2 } @@ -61,7 +66,7 @@ copy_source() { } native_compile() { - "$_compiler" -legacy "$@" + "$_compiler" $CPCFLAGS -legacy "$@" } native_link() { @@ -73,7 +78,7 @@ native_link() { _outsystem="win32" fi shift - "$_linker" -os "$_outsystem" -kernel Kernel -main Kernel -legacycodedir . -o "$_outexe" "$@" + "$_linker" $CPLFALGS -os "$_outsystem" -kernel Kernel -main Kernel -legacycodedir . -o "$_outexe" "$@" fi } @@ -100,14 +105,14 @@ cpfront_main_module() { } cpfront_compile() { - "$_compiler" -outcode CodeC -outsym SymC "$@" + "$_compiler" $CPCFLAGS -outcode CodeC -outsym SymC "$@" } cpfront_link() { local _main="$1" if $_docompile; then cpfront_main_module "$@" > "${_main}.cp" - "$_compiler" -outcode CodeC -outsym SymC -main "${_main}.cp" + "$_compiler" $CPCFLAGS -outcode CodeC -outsym SymC -main "${_main}.cp" fi shift if $_dolink; then -- 2.29.2