aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2023-12-03 07:45:53 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2023-12-03 07:45:53 +0100
commitdd7a4efc643c20c56b845aa11af1fec4b0760d92 (patch)
treeb3e213c7ba4dbff04691f41bd80975bfd1eb600e /Makefile
downloadaoc2023.nes-dd7a4efc643c20c56b845aa11af1fec4b0760d92.tar.gz
aoc2023.nes-dd7a4efc643c20c56b845aa11af1fec4b0760d92.zip
First day of advent of code
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..15c6c3c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+CC65 ?= cl65
+CCOPTS ?= --target nes
+QUIET = @echo ' ' CC65 $@;
+
+
+.PHONY: all
+all: clean deps build
+
+.PHONY: clean
+clean:
+ @rm -rf out
+ @mkdir out
+ @find . -type f -name "*.o" -delete
+ @find . -type f -name "*.nes" -delete
+
+.PHONY: deps
+deps:
+ @which $(CC65) >/dev/null 2>/dev/null || (echo "ERROR: $(CC65) not found." && false)
+
+.PHONY: build
+build: out/1.nes
+
+out/%.nes: src/%.s
+ $(QUIET) $(CC65) $(CCOPTS) $< -o $@