aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 23551ad..ad14afd 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,13 @@ all: $(ROM)
$(BUILD)/%.o: src/%.asm | $(BUILD)
rgbasm $(ASFLAGS) -o $@ $<
+# C programs: compiled with SDCC into ROM-bank blobs and INCBIN'd by programs.asm
+CBLOBS := c/chello.bin
+$(BUILD)/programs.o: $(CBLOBS)
+
+c/%.bin: c/%.c c/crt0.s c/libc.s c/build.sh
+ sh c/build.sh $< $@
+
$(ROM): $(OBJS)
rgblink -m $(BUILD)/gbos.map -n $(BUILD)/gbos.sym -o $@ $(OBJS)
rgbfix $(FIXFLAGS) $@