~crc_/retroforth

a26134dc17c791efe55f26ca230cfeae47d88189 — crc 17 days ago 258b9bd
begin some Makefile cleanups

FossilOrigin-Name: e4201c47be1da88aa6da4505e34315a2d71851858bb445da6a592d832b7d9e12
2 files changed, 29 insertions(+), 47 deletions(-)

M Makefile
M vm/nga-c/image.c
M Makefile => Makefile +17 -13
@@ 74,6 74,9 @@ DEVICES += interface/malloc.retro
# -------------------------------------------------------------

GLOSSARY ?= ./bin/retro tools/glossary.retro
ASSEMBLE ?= ./bin/retro-muri
EXTEND ?= ./bin/retro-extend
EXPORT ?= ./bin/retro-embedimage

# -------------------------------------------------------------



@@ 162,36 165,37 @@ bin/retro-describe: tools/retro-describe.retro doc/words.tsv
	chmod +x bin/retro-describe

bin/retro-embedimage: tools/retro-embedimage.c
	$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ tools/retro-embedimage.c
	$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>

bin/retro-extend: tools/retro-extend.c
	$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@  tools/retro-extend.c
	$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>

bin/retro-muri: tools/retro-muri.c
	$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ tools/retro-muri.c
	$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>

bin/retro-unu: tools/retro-unu.c
	$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ tools/retro-unu.c
	$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>

# Image --------------------------------------------------------

ngaImage: image/retro.muri image/retro.forth image/build.retro bin/retro-muri bin/retro-extend
	./bin/retro-muri image/retro.muri
	./bin/retro-extend ngaImage image/retro.forth image/build.retro
ngaImage: toolchain image/retro.muri image/retro.forth image/build.retro
	$(ASSEMBLE) image/retro.muri
	$(EXTEND) ngaImage image/retro.forth image/build.retro

# Executables --------------------------------------------------

bin/retro-repl: vm/nga-c/repl.c vm/nga-c/image.c
	cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro-repl repl.c
	$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>

# retro on unix

update-extensions: bin/retro
	cd package/extensions && ../../bin/retro -f ../../tools/generate-extensions-list.retro >../load-extensions.retro

vm/nga-c/image.c: ngaImage bin/retro-embedimage bin/retro-extend  interface/retro-unix.retro $(DEVICES)
vm/nga-c/image.c: toolchain ngaImage interface/retro-unix.retro $(DEVICES)
	cp ngaImage rre.image
	./bin/retro-extend rre.image $(DEVICES) interface/retro-unix.retro
	./bin/retro-embedimage rre.image >vm/nga-c/image.c
	$(EXTEND) rre.image $(DEVICES) interface/retro-unix.retro
	$(EXPORT) rre.image >vm/nga-c/image.c

bin/retro: vm/nga-c/image.c vm/nga-c/retro.c package/list.forth package/load-extensions.retro
	cd vm/nga-c && $(CC) -DFAST $(OPTIONS) $(ENABLED) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro retro.c $(LIBM) $(LIBDL)


@@ 203,9 207,9 @@ bin/retro: vm/nga-c/image.c vm/nga-c/retro.c package/list.forth package/load-ext

# optional targets

bin/retro-compiler: bin/retro-extend vm/nga-c/retro-compiler.c vm/nga-c/retro-runtime.c
bin/retro-compiler: toolchain vm/nga-c/retro-compiler.c vm/nga-c/retro-runtime.c
	cp ngaImage runtime.image
	./bin/retro-extend runtime.image $(DEVICES) interface/retro-unix.retro
	$(EXTEND) runtime.image $(DEVICES) interface/retro-unix.retro
	cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../retro-runtime retro-runtime.c $(LIBM) $(LIBDL)
	cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro-compiler retro-compiler.c
	objcopy --add-section .ngaImage=runtime.image --set-section-flags .ngaImage=noload,readonly bin/retro-compiler

M vm/nga-c/image.c => vm/nga-c/image.c +12 -34
@@ 10,22 10,22 @@
#define CELL_MAX LLONG_MAX - 1
#endif
#endif
CELL ngaImageCells = 26411;
CELL ngaImage[] = { 1793,25920,26366,26410,202301,415,387,1247,1535,0,11116,0,10,1,10,2,10,3,10,
CELL ngaImageCells = 25967;
CELL ngaImage[] = { 1793,25920,25908,25966,202301,415,387,1247,1535,0,11116,0,10,1,10,2,10,3,10,
                       4,10,5,10,6,10,7,10,8,10,11,10,12,10,13,10,14,10,15,10,
                       16,10,17,10,18,10,19,10,20,10,21,10,22,10,23,10,24,10,25,68223234,
                       1,2575,85000450,1,656912,163,180,268505089,65,64,285281281,0,65,2063,10,101384453,0,9,10,68485378,
                       1,2575,85000450,1,656912,135,180,268505089,65,64,285281281,0,65,2063,10,101384453,0,9,10,68485378,
                       255,18350338,8,255,1045,18350338,16,255,1045,352393217,24,255,10,268289,-24,68229121,-16,68229121,-8,2577,
                       2049,58,25,459011,99,524546,99,302256641,1,10,16974595,0,50529798,10,25,524547,118,50529798,10,17108738,
                       1,251790353,101777669,1,17565186,109,524545,113,66,167838467,-1,134287105,3,61,659457,3,459023,130,2049,58,
                       25,2049,130,1793,137,2049,137,117506307,0,130,0,524545,28,135,168820993,0,149,1642241,149,134283523,
                       13,135,1793,130,524545,2049,130,1793,130,16846593,149,163,180,1793,66,16846593,149,135,180,1793,
                       66,7,10,659713,1,659713,2,659713,3,659713,4,659713,5,1793,26175,17108737,3,2,524559,130,
                       2049,130,2049,130,524545,0,130,524545,0,130,2049,144,1048838,2,1642241,10,7,25156,1247,167841793,
                       66,7,10,659713,1,659713,2,659713,3,659713,4,659713,5,1793,194,17108737,3,2,524559,130,
                       2049,130,2049,130,524545,0,130,524545,0,130,2049,144,1048838,2,1642241,10,7,522,1247,167841793,
                       216,11,17826049,0,216,2,15,25,524546,190,134287105,217,118,2305,218,459023,226,134287361,217,221,
                       659201,216,10,659969,7,2049,58,25,17694978,58,242,9,84152833,48,319750404,241,117507601,244,184618754,45,
                       25,16974851,-1,168886532,1,134284289,1,257,134284289,0,244,660227,32,0,0,115,105,103,105,108,
                       58,105,0,285278479,274,6,2576,524546,104,1641217,1,167838467,271,2049,286,2049,282,524545,274,236,
                       58,100,0,285278479,274,6,2576,524546,104,1641217,1,167838467,271,2049,286,2049,282,524545,274,236,
                       17826050,273,0,2572,2563,2049,264,1793,156,459023,156,1793,312,17760513,168,3,192,8,251727617,3,
                       2,2049,182,16,168820993,-1,149,2049,182,2575,2049,236,17563906,0,326,9,1793,156,285282049,3,
                       2,134287105,149,323,524545,1793,130,16846593,3,0,130,8,659201,3,524545,28,135,17043201,3,13,


@@ 73,8 73,8 @@ CELL ngaImage[] = { 1793,25920,26366,26410,202301,415,387,1247,1535,0,11116,0,10
                       101,0,1171,92,168,502,6385574852,112,97,99,107,0,1181,78,168,502,6954102567431,117,110,112,
                       97,99,107,0,1191,186,168,502,7572226160734292,100,58,115,111,117,114,99,101,0,1203,188,
                       168,502,6953375310887,100,58,104,97,115,104,0,1217,387,168,502,-3366153855364863819,101,114,114,58,110,
                       111,116,102,111,117,110,100,0,105,109,97,103,101,58,115,97,118,101,0,103,
                       101,0,65,68,77,69,46,114,101,116,114,111,0,0,111,0,117,110,100,0,
                       111,116,102,111,117,110,100,0,100,114,111,112,0,0,99,101,0,118,101,0,
                       0,116,114,111,45,117,110,105,120,46,114,101,116,114,111,0,117,110,100,0,
                       99,107,101,116,115,46,0,50,46,49,47,83,79,67,75,69,84,83,46,109,
                       100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,


@@ 170,7 170,7 @@ CELL ngaImage[] = { 1793,25920,26366,26410,202301,415,387,1247,1535,0,11116,0,10
                       110,58,105,110,99,0,659713,1,10,3114,3139,168,16180,210720197721,110,58,100,101,99,0,
                       659969,1,10,3128,3158,168,16180,8246617666422322998,110,58,98,101,116,119,101,101,110,63,0,67503109,
                       1793,3166,67503109,67503109,2049,3106,10,1,3161,2049,2241,11,10,3142,3187,168,16180,249861296566813883,83,99,
                       111,112,101,76,105,115,116,0,26268,26322,10,3172,3198,168,16180,5864091,123,123,0,2049,
                       111,112,101,76,105,115,116,0,25364,25765,10,3172,3198,168,16180,5864091,123,123,0,2049,
                       1576,2,1,3187,2049,61,16,10,3190,3225,168,16180,-6305314778776785742,45,45,45,114,101,118,101,
                       97,108,45,45,45,0,2049,1576,1,3187,2049,3125,16,10,3207,3241,168,16180,5864159,125,
                       125,0,1,3187,2049,58,4,15,11,1793,3255,3841,3187,4097,2,10,1,3250,1793,3281,


@@ 228,7 228,7 @@ CELL ngaImage[] = { 1793,25920,26366,26410,202301,415,387,1247,1535,0,11116,0,10
                       10,4239,4297,156,16180,-4600587576916820603,84,101,109,112,83,116,114,105,110,103,115,0,32,4280,
                       4317,156,16180,7474516786580364824,84,101,109,112,83,116,114,105,110,103,77,97,120,0,512,4298,
                       4331,168,16180,229440420829967,83,84,82,73,78,71,83,0,2049,1545,3841,4297,3841,4317,19,18,
                       10,4318,4353,156,0,0,67,117,114,114,101,110,116,0,22,10,4340,4370,168,0,
                       10,4318,4353,156,0,0,67,117,114,114,101,110,116,0,8,10,4340,4370,168,0,
                       0,115,58,112,111,105,110,116,101,114,0,3841,4353,3841,4317,19,2049,4331,17,10,
                       4355,4391,168,0,0,115,58,110,101,120,116,0,1,4353,2049,3864,3841,4353,3841,4297,
                       11,1793,4407,1,0,4097,4353,10,1,4402,9,10,4318,4423,168,16180,6953962777192,115,58,116,


@@ 526,7 526,7 @@ CELL ngaImage[] = { 1793,25920,26366,26410,202301,415,387,1247,1535,0,11116,0,10
                       2229,2049,3125,10,1,10217,2049,2449,2049,415,10,10093,10266,168,16180,8246849872898570441,115,58,101,118,
                       97,108,117,97,116,101,0,2049,10158,2049,5573,2049,10158,2,2049,10182,2049,10215,10,10250,
                       10286,156,0,0,76,80,0,0,10278,10298,156,0,0,73,110,100,101,120,0,0,
                       15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,10287,10340,168,0,0,110,101,120,116,
                       0,3841,10286,1,10298,17,2049,3864,10,10330,10358,168,0,0,112,114,101,112,0,1,
                       10286,2049,3864,1,0,3841,10286,1,10298,17,16,10,10348,10381,168,0,0,100,111,110,


@@ 1309,26 1309,4 @@ CELL ngaImage[] = { 1793,25920,26366,26410,202301,415,387,1247,1535,0,11116,0,10
                       110,0,1,25874,2049,8246,2049,10761,10,25822,25920,168,25939,6953744547860,108,105,115,116,101,110,
                       0,3841,25376,1793,25927,2049,25834,10,1,25924,2049,74,2049,25760,2049,25778,1,25931,7,10,
                       105,110,116,101,114,102,97,99,101,47,114,101,116,114,111,45,117,110,105,120,
                       46,114,101,116,114,111,0,25908,25979,156,0,229441520490121,83,111,117,114,99,101,115,0,
                       1,26216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,25966,26119,168,0,6953711201841,107,110,111,119,110,63,0,
                       2,1,25979,2049,9003,10,26107,26136,168,0,210716136861,105,110,100,101,120,0,1,25979,4,
                       2049,9320,1,25979,4,2049,9140,10,26125,26159,168,0,6953974036516,114,101,99,111,114,100,0,
                       2049,4500,2,1,25979,2049,3864,3841,25979,1,25979,17,16,10,1793,26214,2049,15559,2049,26119,
                       1793,26184,2049,26136,10,1,26181,1793,26191,2049,26159,10,1,26188,2049,66,1793,26204,1,192,
                       1,2,17,8,10,1,26197,2049,2229,2049,1576,2049,186,16,10,1,26175,100,105,99,
                       116,45,119,111,114,100,115,45,108,105,115,116,105,110,103,46,102,111,114,116,
                       104,0,25908,26254,168,26216,229461403550098,100,58,119,111,114,100,115,0,1793,26263,2049,190,2049,
                       10761,2049,10731,10,1,26256,2049,8491,10,26241,26286,168,26216,-3502157631813457253,100,58,119,111,114,100,
                       115,45,119,105,116,104,0,2049,1977,2049,5573,1793,26317,2049,190,2,2049,1977,2049,5286,
                       1793,26306,2049,10761,2049,10731,10,1,26301,1793,26312,3,10,1,26310,2049,66,10,1,26292,
                       2049,8491,10,26268,26343,168,26216,2818131571306626127,100,105,115,112,108,97,121,45,105,102,45,108,
                       101,102,116,0,2,2049,1977,2049,5519,1793,26355,2049,10761,2049,10731,10,1,26350,1793,26361,
                       3,10,1,26359,2049,66,10,26268,26394,168,26216,2947807019553410009,100,58,119,111,114,100,115,45,
                       98,101,103,105,110,110,105,110,103,45,119,105,116,104,0,2049,1977,2049,5573,1793,
                       26405,2049,190,2049,26343,10,1,26400,2049,8491,10,0 };
                       46,114,101,116,114,111,0,0 };