X-Git-Url: https://deadsoftware.ru/gitweb?p=cpc.git;a=blobdiff_plain;f=make-all.sh;h=71fc18e56e96a3f5f5c50468e851a5395a20fff7;hp=696571af89f7c3560845482592976bd84d2dac7e;hb=ffbc6ec7ce6fa462b30409ba8ec3ee4bdc175d15;hpb=e6f2dc69e5d8af2c60cf85c43fced7c370a9e427 diff --git a/make-all.sh b/make-all.sh index 696571a..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 ### ###___________### @@ -45,9 +48,12 @@ usage() { echo " cpfront Generic C" echo "Operation systems:" echo " linux GNU/Linux" + echo " cygwin Cygwin" 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 } @@ -63,13 +69,17 @@ make_stage() { local _this_system="$4" shift 4 "$_this/make.sh" -o "$_dir" -c "$_compiler" -l "$_linker" "$@" "$_this_cpu" "$_this_target" "$_this_system" + local _ext= + if [ "$_host_system" = "cygwin" ]; then + _ext=".exe" + fi if [ "$_target" = "cpfront" ]; then - _compiler="$_dir/cpfront" + _compiler="$_dir/cpfront${_ext}" _linker= else if [ "$_cpu" = "486" ]; then - _compiler="$_dir/cpc486" - _linker="$_dir/cpl486" + _compiler="$_dir/cpc486${_ext}" + _linker="$_dir/cpl486${_ext}" else error "unsupported cpu $_cpu" fi