summaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index f0979f3f..cd42a433 100644
--- a/rules.mk
+++ b/rules.mk
@@ -4,7 +4,17 @@ OBJS = $(addprefix $(BUILD)/, $(notdir %/$(subst .c,.o, $(SRCS))))
SUBMODULES = tinyusb
+ifndef EMSCRIPTEN
all: directory $(SUBMODULES) $(BUILD)/$(BIN).elf $(BUILD)/$(BIN).hex $(BUILD)/$(BIN).bin $(BUILD)/$(BIN).uf2 size
+else
+all: directory $(SUBMODULES) $(BUILD)/$(BIN).html
+endif
+
+$(BUILD)/$(BIN).html: $(OBJS)
+ @echo HTML $@
+ @$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ \
+ -s EXPORTED_FUNCTIONS=_main \
+ --shell-file=$(TOP)/watch-library/simulator/shell.html
$(BUILD)/$(BIN).elf: $(OBJS)
@echo LD $@