aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e9d56bf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+CC65 ?= cl65
+CCOPTS ?= --verbose --target nes
+
+##
+# General targets.
+
+.PHONY: all
+all: clean deps build
+
+.PHONY: clean
+clean:
+ @rm -rf out
+ @mkdir out
+
+.PHONY: deps
+deps:
+ @which $(CC65) >/dev/null 2>/dev/null || (echo "ERROR: $(CC65) not found." && false)
+
+.PHONY: build
+build: out/input.nes
+
+out/input.nes: examples/input.s examples/wrapper.s
+ $(CC65) $(CCOPTS) examples/input.s examples/wrapper.s -o $@