aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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 $@