Adding an icon.

This commit is contained in:
Brad Nelson
2021-01-04 12:49:26 -08:00
parent 7275245858
commit f9bf1c005f
2 changed files with 59 additions and 29 deletions

View File

@ -1,74 +1,104 @@
CFLAGS=-O2 -Wall -Werror -I./ -I./out OUT = out
GEN = $(OUT)/gen
RES = $(OUT)/resources
WEB = $(OUT)/web
POSIX = $(OUT)/posix
ARDUINO = $(OUT)/arduino
CFLAGS=-O2 -Wall -Werror -I ./ -I $(OUT)
LIBS=-ldl LIBS=-ldl
TARGETS = out/web/terminal.html \ TARGETS = $(WEB)/terminal.html \
out/web/ueforth.js \ $(WEB)/ueforth.js \
out/posix/ueforth \ $(POSIX)/ueforth \
out/arduino/ueforth.ino $(ARDUINO)/ueforth.ino
all: $(TARGETS) tests all: $(TARGETS) $(RES)/eforth.ico tests
tests: core_test tests: core_test
core_test: out/posix/ueforth common/core_test.fs \ core_test: $(POSIX)/ueforth common/core_test.fs \
common/core_test.fs.golden common/core_test.fs.golden
echo "include common/core_test.fs" | $< | \ echo "include common/core_test.fs" | $< | \
diff - common/core_test.fs.golden diff - common/core_test.fs.golden
out/gen: $(GEN):
mkdir -p out/gen mkdir -p $@
POSIX_BOOT = common/boot.fs posix/posix.fs POSIX_BOOT = common/boot.fs posix/posix.fs
out/gen/posix_boot.h: common/source_to_string.js $(POSIX_BOOT) | out/gen $(GEN)/posix_boot.h: common/source_to_string.js $(POSIX_BOOT) | $(GEN)
echo "ok" | cat $(POSIX_BOOT) - | $< boot >$@ echo "ok" | cat $(POSIX_BOOT) - | $< boot >$@
ARDUINO_BOOT = common/boot.fs ARDUINO_BOOT = common/boot.fs
out/gen/arduino_boot.h: common/source_to_string.js $(ARDUINO_BOOT) | out/gen $(GEN)/arduino_boot.h: common/source_to_string.js $(ARDUINO_BOOT) | $(GEN)
echo "ok" | cat $(ARDUINO_BOOT) - | $< boot >$@ echo "ok" | cat $(ARDUINO_BOOT) - | $< boot >$@
out/gen/dump_web_opcodes: web/dump_web_opcodes.c common/opcodes.h | out/gen $(GEN)/dump_web_opcodes: web/dump_web_opcodes.c common/opcodes.h | $(GEN)
$(CC) $(CFLAGS) $< -o $@ $(CC) $(CFLAGS) $< -o $@
out/gen/web_cases.js: out/gen/dump_web_opcodes | out/gen $(GEN)/web_cases.js: $(GEN)/dump_web_opcodes | $(GEN)
$< cases >$@ $< cases >$@
out/gen/web_dict.js: out/gen/dump_web_opcodes | out/gen $(GEN)/web_dict.js: $(GEN)/dump_web_opcodes | $(GEN)
$< dict >$@ $< dict >$@
out/web: $(RES):
mkdir -p out/web mkdir -p $@
out/web/terminal.html: web/terminal.html | out/web $(RES)/eforth16x16.png: images/eforth.png | $(RES)
convert -resize 16x16 $< $@
$(RES)/eforth32x32.png: images/eforth.png | $(RES)
convert -resize 32x32 $< $@
$(RES)/eforth48x48.png: images/eforth.png | $(RES)
convert -resize 48x48 $< $@
$(RES)/eforth256x256.png: images/eforth.png | $(RES)
convert -resize 256x256 $< $@
ICON_SIZES = $(RES)/eforth256x256.png \
$(RES)/eforth48x48.png \
$(RES)/eforth32x32.png \
$(RES)/eforth16x16.png
$(RES)/eforth.ico: $(ICON_SIZES)
convert $^ $< $@
$(WEB):
mkdir -p $(WEB)
$(WEB)/terminal.html: web/terminal.html | $(WEB)
cp $< $@ cp $< $@
out/web/ueforth.js: \ $(WEB)/ueforth.js: \
web/fuse_web.js \ web/fuse_web.js \
web/web.template.js \ web/web.template.js \
common/boot.fs \ common/boot.fs \
out/gen/web_dict.js \ $(GEN)/web_dict.js \
out/gen/web_cases.js | out/web $(GEN)/web_cases.js | $(WEB)
$^ >$@ $^ >$@
out/posix: $(POSIX):
mkdir -p out/posix mkdir -p $@
out/posix/ueforth: \ $(POSIX)/ueforth: \
posix/posix_main.c \ posix/posix_main.c \
common/opcodes.h \ common/opcodes.h \
common/core.h \ common/core.h \
out/gen/posix_boot.h | out/posix $(GEN)/posix_boot.h | $(POSIX)
$(CC) $(CFLAGS) $< -o $@ $(LIBS) $(CC) $(CFLAGS) $< -o $@ $(LIBS)
out/arduino: $(ARDUINO):
mkdir -p out/arduino mkdir -p $@
out/arduino/ueforth.ino: \ $(ARDUINO)/ueforth.ino: \
arduino/fuse_ino.js \ arduino/fuse_ino.js \
arduino/arduino.template.ino \ arduino/arduino.template.ino \
common/opcodes.h \ common/opcodes.h \
common/core.h \ common/core.h \
out/gen/arduino_boot.h | out/arduino $(GEN)/arduino_boot.h | $(ARDUINO)
$^ >$@ $^ >$@
clean: clean:
rm -rf out/ rm -rf $(OUT)

BIN
ueforth/images/eforth.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB