X-Git-Url: https://deadsoftware.ru/gitweb?p=cpc.git;a=blobdiff_plain;f=make.sh;h=2c0c53b4d632b0fb31c5737c08976cfa47a9fae7;hp=af287d95d50bba19ba9f130fcf00ad95ee7fd416;hb=4257db65ead872485357beb6f30c0f0fa6e7009c;hpb=4399688214fe9abbf588fe811bfc5a8cd074ae98 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