diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2025-04-13 09:34:13 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2025-04-13 09:37:47 +0200 |
| commit | 3290a1c2756441fd57f97f7e305989dae568dd96 (patch) | |
| tree | c4552f96f7d515797befb1b592dcc8a5c115f215 /Makefile | |
| parent | b5620018b8b9f78742dd1ac08a64f2f19241346e (diff) | |
Refactored Project Structure
We now keep carts (including potential test carts) in a `carts` folder
and distinguish between cart exports and system files (i.e. the PICO-8
WASM blob and the data pod).
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 29 |
1 files changed, 22 insertions, 7 deletions
@@ -1,13 +1,28 @@ PICO8 = pico8 -export/pico8.data.pod: export/pico8.js tools/extract-data-pod.exe +.PHONY: system +system: system/pico8.data.pod system/pico8.wasm + +system/pico8.data.pod: export/pico8.js tools/extract-data-pod.exe system/.dir tools/extract-data-pod.exe $< $@ -tools/extract-data-pod.exe: tools/extract-data-pod.c - $(CC) $< -o $@ +system/pico8.wasm: export/pico8.wasm system/.dir + cp $< $@ + +export/%.html export/%.js export/%.wasm: export/%.w ; +export/%.w: carts/%.p8 export/.dir + $(PICO8) $< -export "-w $(@:.w=.html)" -export/pico8.html export/pico8.js export/pico8.wasm: export/pico8 ; +export/%.p8.png: carts/%.p8 export/.dir + $(PICO8) $< -export $@ + +export/%.p8.rom: carts/%.p8 export/.dir + $(PICO8) $< -export $@ + +tools/%.exe: tools/%.c + $(CC) $< -o $@ -.INTERMEDIATE: export/pico8 -export/pico8: export/cart.p8 - $(PICO8) $< -export "-w [email protected]" +.INTERMEDIATE: export/.dir system/.dir +%/.dir: + @mkdir -p $(dir $@) + @touch $@ |
