fix issues with GNUmakefile so that bin/retro-compiler will now build properly

FossilOrigin-Name: e7b88b2ab64c8d3b401937e20a23bcc408c80f7c4ea70c6cce689fdb210b7453
This commit is contained in:
crc 2024-04-04 09:39:10 +00:00
parent 43d64b287b
commit 7d303ecb45

View file

@ -93,34 +93,33 @@ install-manpages:
# toolchain targets # toolchain targets
bin/retro-describe: tools/retro-describe.retro doc/words.tsv bin/retro-describe: tools/retro-describe.retro doc/words.tsv
cat tools/retro-describe.retro doc/words.tsv >bin/retro-describe @cat tools/retro-describe.retro > bin/retro-describe
chmod +x bin/retro-describe @cat doc/words.tsv >> bin/retro-describe
@chmod +x bin/retro-describe
bin/retro-embedimage: tools/retro-embedimage.c 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 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 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 bin/retro-unu: tools/retro-unu.c
$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ tools/retro-unu.c @$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
# basic image target # basic image target
ngaImage: image/retro.muri image/retro.forth bin/retro-muri bin/retro-extend ngaImage: toolchain image/retro.muri image/retro.forth image/build.retro
./bin/retro-muri image/retro.muri @$(ASSEMBLE) image/retro.muri
./bin/retro-extend ngaImage image/retro.forth image/build.retro @$(EXTEND) ngaImage image/retro.forth image/build.retro
# minimal system # minimal system
bin/retro-repl: vm/nga-c/repl.c vm/nga-c/image.c 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 # retro on unix
@ -144,14 +143,14 @@ bin/retro: vm/nga-c/image.c vm/nga-c/retro.c package/list.forth package/load-ext
# optional targets # 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 @cp ngaImage runtime.image
./bin/retro-extend runtime.image interface/scripting.retro interface/filesystem.retro interface/floatingpoint.retro interface/unix.retro interface/rng.retro interface/retro-unix.retro interface/clock.retro @$(EXTEND) runtime.image $(DEVICES) interface/retro-unix.retro
cd vm/nga-c && $(CC) $(OPTIONS) $(ENABLED) $(CFLAGS) $(LDFLAGS) -o ../../retro-runtime retro-runtime.c $(LIBM) $(LIBDL) @cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../retro-runtime retro-runtime.c $(LIBM) $(LIBDL)
cd vm/nga-c && $(CC) $(OPTIONS) $(ENABLED) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro-compiler retro-compiler.c @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 @objcopy --add-section .ngaImage=runtime.image --set-section-flags .ngaImage=noload,readonly bin/retro-compiler
objcopy --add-section .runtime=retro-runtime --set-section-flags .runtime=noload,readonly bin/retro-compiler @objcopy --add-section .runtime=retro-runtime --set-section-flags .runtime=noload,readonly bin/retro-compiler
rm runtime.image retro-runtime @rm runtime.image retro-runtime
image-js: bin/retro image-js: bin/retro
./bin/retro example/retro-generate-image-js.retro >vm/nga-js/image.js ./bin/retro example/retro-generate-image-js.retro >vm/nga-js/image.js
@ -167,16 +166,16 @@ sorted: doc/words.tsv
mv sorted.tsv doc/words.tsv mv sorted.tsv doc/words.tsv
doc/Glossary.txt: bin/retro sorted doc/Glossary.txt: bin/retro sorted
./bin/retro tools/glossary.retro export glossary >doc/Glossary.txt $(GLOSSARY) export glossary >doc/Glossary.txt
doc/Glossary.html: bin/retro sorted doc/Glossary.html: bin/retro sorted
./bin/retro tools/glossary.retro export html >doc/Glossary.html $(GLOSSARY) export html >doc/Glossary.html
doc/Glossary-Concise.txt: bin/retro sorted doc/Glossary-Concise.txt: bin/retro sorted
./bin/retro tools/glossary.retro export concise >doc/Glossary-Concise.txt $(GLOSSARY) export concise >doc/Glossary-Concise.txt
doc/Glossary-Names-and-Stack.txt: bin/retro sorted doc/Glossary-Names-and-Stack.txt: bin/retro sorted
./bin/retro tools/glossary.retro export concise-stack >doc/Glossary-Names-and-Stack.txt $(GLOSSARY) export concise-stack >doc/Glossary-Names-and-Stack.txt