aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2023-12-05 15:37:35 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2023-12-08 12:41:31 +0100
commit57fde0bb5184371da33b212de6731c6e6829349f (patch)
tree916bf9ebfa6334b75ee91594b870de6ad1a0e9ec /Makefile
parentc0d6966592a0aaeda220fff1171f057ef14a7ea6 (diff)
downloadaoc2023.nes-57fde0bb5184371da33b212de6731c6e6829349f.tar.gz
aoc2023.nes-57fde0bb5184371da33b212de6731c6e6829349f.zip
Implemented both parts of the second day
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
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 $@