aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2025-04-12 22:27:40 +0200
committerNicholas Rodrigues Lordello <[email protected]>2025-04-12 22:27:40 +0200
commitb5620018b8b9f78742dd1ac08a64f2f19241346e (patch)
tree896a0d1bacbc599edcf5733b3e0f3ceecec4cff9 /Makefile
parent48d3c24837bef74a14b0c78e959f2c601b397208 (diff)
Extra PICO-8 Data Pod
Add a tool for extracting the PICO-8 data.pod file that is exported with the cart. This includes (on inspecting the binary) the boot sequence cart among some other things. It is written as a quick and dirty C program (since we will have to practice our C anyway).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 16dd498..9c5e346 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,13 @@
PICO8 = pico8
-export/pico8.wasm: export/cart.p8
- $(PICO8) $< -export "-w $(@:.wasm=.html)"
+export/pico8.data.pod: export/pico8.js tools/extract-data-pod.exe
+ tools/extract-data-pod.exe $< $@
+
+tools/extract-data-pod.exe: tools/extract-data-pod.c
+ $(CC) $< -o $@
+
+export/pico8.html export/pico8.js export/pico8.wasm: export/pico8 ;
+
+.INTERMEDIATE: export/pico8
+export/pico8: export/cart.p8
+ $(PICO8) $< -export "-w [email protected]"