DEADSOFTWARE

remove SYSTEM_ADDRESS from SYSTEM.h
[cpc.git] / make.sh
diff --git a/make.sh b/make.sh
index af287d95d50bba19ba9f130fcf00ad95ee7fd416..2c0c53b4d632b0fb31c5737c08976cfa47a9fae7 100755 (executable)
--- 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