2 #! --------------------------------------------------------------
3 #! Retro Development Kit
5 #! This is the build script for RDEV. It is currently being
6 #! updated to be a bit more modular and easier to extend in the
8 #! --------------------------------------------------------------
14 #! --------------------------------------------------------------
15 #! Read input from the user
16 #! --------------------------------------------------------------
24 #! --------------------------------------------------------------
25 #! Display menu of build options
26 #! --------------------------------------------------------------
30 echo Retro Development Kit http
://retroforth.org
31 echo --------------------------------------------------------------
32 echo Please
select the target you wish to build from the list
35 echo 1. Console Build
2 \
(faster VM\
)
36 echo 2. Retro image
for Ngaro JS
37 echo 3. Java Web Build
72 #! --------------------------------------------------------------
74 #! --------------------------------------------------------------
85 #! --------------------------------------------------------------
86 #! Build Ngaro (C, with SDL)
87 #! --------------------------------------------------------------
88 function ngaro_crc_sdl
90 cd $THIS/ngaro
/c-crc
/sdl
91 gcc
-Wall -O3 -fomit-frame-pointer disassemble.c endian.c loader.c ngaro.c devices.c vm.c
-DUSE_SDL -Wall `sdl-config --cflags --libs` -o ngaro
93 mv ngaro
/c-crc
/sdl
/ngaro bin
98 #! --------------------------------------------------------------
99 #! Build Ngaro (C, text only)
100 #! --------------------------------------------------------------
101 function ngaro_crc_tty
103 cd $THIS/ngaro
/c-crc
/console
104 gcc
-Wall -O3 -fomit-frame-pointer disassemble.c endian.c loader.c ngaro.c vm.c
-o ngaro
106 mv ngaro
/c-crc
/console
/ngaro bin
109 function ngaro_mat_tty
112 gcc
-Wall -O3 -fomit-frame-pointer endian.c loader.c ngaro.c tty_devices.c vm.c
-o ngaro
114 mv ngaro
/c-mat
/ngaro bin
119 #! --------------------------------------------------------------
120 #! Build the RETRO image.
121 #! --------------------------------------------------------------
125 ln -s $THIS/bin
/bootstrap.toka
126 $THIS/bin
/toka retro.toka
129 mv retro
/forth.image bin
130 mv retro
/forth.image.map bin
132 gcc _build
/fix-image.c
-o bin
/fix-image
134 .
/fix-image forth.image
141 $THIS/bin
/toka
$THIS/_build
/image2js.toka forth.image
>image.js
148 $THIS/bin
/toka
$THIS/_build
/image2java.toka forth.image
>$THIS/ngaro
/java
/image.java
150 cat Ngaro.top image.java Ngaro.bottom
>NgaroVM.java
153 mv NgaroVM.class
$THIS/bin
161 $THIS/bin
/toka
$THIS/_build
/image2j2me.toka forth.image
>$THIS/ngaro
/j2me
/src
/Retro
/Img.java.middle
162 cd $THIS/ngaro
/j2me
/src
/Retro
163 cat Img.java.top Img.java.middle Img.java.bottom
>Img.java
166 rm src
/Retro
/Img.java.middle src
/Retro
/Img.java