Moved I/O into platform.

This commit is contained in:
Brad Nelson
2021-01-02 21:54:40 -08:00
parent 39458d1789
commit 86d2fecbda
6 changed files with 75 additions and 23 deletions

View File

@ -11,8 +11,13 @@ all: $(TARGETS)
out/gen:
mkdir -p out/gen
out/gen/boot.h: common/source_to_string.js common/boot.fs | out/gen
$^ boot >$@
POSIX_BOOT = common/boot.fs posix/posix.fs
out/gen/posix_boot.h: common/source_to_string.js $(POSIX_BOOT) | out/gen
echo "ok" | cat $(POSIX_BOOT) - | $< boot >$@
ARDUINO_BOOT = common/boot.fs posix/posix.fs
out/gen/arduino_boot.h: common/source_to_string.js $(ARDUINO_BOOT) | out/gen
echo "ok" | cat $(ARDUINO_BOOT) - | $< boot >$@
out/gen/dump_web_opcodes: web/dump_web_opcodes.c common/opcodes.h | out/gen
$(CC) $(CFLAGS) $< -o $@
@ -32,7 +37,7 @@ out/web/terminal.html: web/terminal.html | out/web
out/web/ueforth.js: \
web/fuse_web.js \
web/web.template.js \
out/gen/boot.h \
common/boot.fs \
out/gen/web_dict.js \
out/gen/web_cases.js | out/web
$^ >$@
@ -44,7 +49,7 @@ out/posix/ueforth: \
posix/posix_main.c \
common/opcodes.h \
common/core.h \
out/gen/boot.h | out/posix
out/gen/posix_boot.h | out/posix
$(CC) $(CFLAGS) $< -o $@ $(LIBS)
out/arduino:
@ -55,7 +60,7 @@ out/arduino/ueforth.ino: \
arduino/arduino.template.ino \
common/opcodes.h \
common/core.h \
out/gen/boot.h | out/arduino
out/gen/arduino_boot.h | out/arduino
$^ >$@
clean: