Explorar o código

Compile and link scripts updated to use Ofront+ on Linux

Arthur Yefimov %!s(int64=4) %!d(string=hai) anos
pai
achega
4d4c27db56
Modificáronse 4 ficheiros con 46 adicións e 14 borrados
  1. 5 2
      data/bin/compile.bat
  2. 13 5
      data/bin/compile.sh
  3. 3 0
      data/bin/link_graph.bat
  4. 25 7
      data/bin/link_graph.sh

+ 5 - 2
data/bin/compile.bat

@@ -1,6 +1,9 @@
 @ECHO OFF
-REM This script is run by Free Oberon on Windows. Current directory of the
-REM script will be where FreeOberon.exe is located.
+REM This script is automatically run by Free Oberon on Windows
+REM for each compiled module. The initial current directory of
+REM the script is where FreeOberon executable is located.
+REM You are free to edit this file to adjust the process.
+
 CD bin >nul 2>&1
 SET CURDIR=%~dp0
 SET OFRDIR=%CURDIR%OfrontPlus\Target\Win64

+ 13 - 5
data/bin/compile.sh

@@ -1,10 +1,18 @@
 #!/bin/bash
-# This script is run by Free Oberon on Linux. Current directory of the
-# script will be where FreeOberon executable is located.
+#   This script is automatically run by Free Oberon on Windows
+#   for each compiled module. The initial current directory of
+#   the script is where FreeOberon executable is located.
+#   You are free to edit this file to adjust the process.
+
 cd bin
-VOCDIR=../data/bin/voc/install
-VOC=$VOCDIR/bin/voc
-$VOC -OC -cfF $2 ../Programs/$1
+
+OFRDIR="../data/bin/OfrontPlus/Target/Linux_amd64"
+PATH="$OFRDIR:$PATH"
+export OBERON=".:$OFRDIR/Lib/Sym"
+OFR="ofront+ -88 -C -s"
+
+
+$OFR $2 ../Programs/$1
 retcode=$?
 cd ..
 exit $retcode

+ 3 - 0
data/bin/link_graph.bat

@@ -2,6 +2,7 @@
 REM This script is run by Free Oberon on Windows. Current directory of the
 REM script will be where FreeOberon.exe is located. This particular script
 REM is for graphical programs.
+
 CD bin >nul 2>&1
 @DEL /s %~n1.exe >nul 2>&1
 SET CURDIR=%~dp0
@@ -24,6 +25,7 @@ GOTO START
 :FINISH
 REM END Put all ARGS.
 ECHO ON
+
 %CC% -g3 -O0 -fno-exceptions ^
   -I %OFRDIR%\..\..\Mod\Lib ^
   -I %OFRDIR%\Lib\Obj ^
@@ -33,4 +35,5 @@ ECHO ON
   %OFRDIR%\Lib\Ofront.a ^
   %SDL2Opts% -lSDL2_image
 @SET RETCODE=%ERRORLEVEL%
+
 @EXIT /b %RETCODE%

+ 25 - 7
data/bin/link_graph.sh

@@ -2,19 +2,37 @@
 # This script is run by Free Oberon on Linux. Current directory of the
 # script will be where FreeOberon executable is located. This
 # particular script is for graphical programs.
+
 cd bin
-VOCDIR=../data/bin/voc/install
-CC=gcc
+
 THENAME="${1%.*}"
 ONAME="${THENAME##*/}"
+OFRDIR="../data/bin/OfrontPlus/Target/Linux_amd64"
+PATH="$OFRDIR:$PATH"
+CC="gcc"
+
 SDL2Opts=`sdl2-config --cflags --libs`
+
 shift
-$CC -fPIC -g -I $VOCDIR/C/include \
-  -o $ONAME $ONAME.o \
+
+
+
+
+
+
+
+
+
+
+
+
+$CC -g3 -O0 -fno-exceptions \
+  -I $OFRDIR/../../Mod/Lib \
+  -I $OFRDIR/Lib/Obj \
+  $ONAME.c -o $ONAME \
   $@ \
-  $VOCDIR/lib/Graph.o $VOCDIR/lib/SDL2.o \
-  $VOCDIR/lib/Int.o \
-  $VOCDIR/lib/libvoc-OC.a \
+  ../data/bin/libFreeOberon.a \
+  $OFRDIR/Lib/libOfront.a \
   $SDL2Opts -lSDL2_image
 retcode=$?
 cd ..