aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4130ebf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,38 @@
+V =
+ifeq ($(strip $(V)),)
+ E = @echo
+ Q = @
+else
+ E = @\#
+ Q =
+endif
+
+CC65 ?= cl65
+CCOPTS ?= --target nes
+
+.PHONY: all
+all: clean deps build
+
+.PHONY: clean
+clean:
+ @rm -rf out
+ @find . -type f -name "*.o" -delete
+ @find . -type f -name "*.nes" -delete
+ @mkdir -p out/
+
+.PHONY: deps
+deps:
+ @which $(CC65) >/dev/null 2>/dev/null || (echo "ERROR: $(CC65) not found." && false)
+
+.PHONY: build
+build: build-full build-partial
+
+.PHONY: build-full
+build-full:
+ $(E) " CC jetpac (full)"
+ $(Q) $(CC65) $(CCOPTS) src/jetpac.s -C config/nrom.cfg -o out/jetpac.nes
+
+.PHONY: build-partial
+build-partial:
+ $(E) " CC jetpac (partial)"
+ $(Q) $(CC65) $(CCOPTS) src/jetpac.s -C config/nrom.cfg --asm-define PARTIAL=1 -o out/partial.nes