aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 15c6c3c..37723c5 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,8 @@ CC65 ?= cl65
CCOPTS ?= --target nes
QUIET = @echo ' ' CC65 $@;
+SOURCES = $(shell find src/ -type f -name '*.s' -printf "%f\n")
+ROMS = $(SOURCES:%.s=out/%.nes)
.PHONY: all
all: clean deps build
@@ -18,7 +20,7 @@ deps:
@which $(CC65) >/dev/null 2>/dev/null || (echo "ERROR: $(CC65) not found." && false)
.PHONY: build
-build: out/1.nes
+build: $(ROMS)
out/%.nes: src/%.s
$(QUIET) $(CC65) $(CCOPTS) $< -o $@