aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 9500e45..5f1b54e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,23 +1,27 @@
CC65 ?= cl65
CCOPTS ?= --verbose --target nes
-##
-# General targets.
-
.PHONY: all
all: clean deps build
.PHONY: clean
clean:
@rm -rf out
- @mkdir out
+ @mkdir -p out/basics
.PHONY: deps
deps:
@which $(CC65) >/dev/null 2>/dev/null || (echo "ERROR: $(CC65) not found." && false)
.PHONY: build
-build: out/input.nes out/sprite.nes
+build: basics space
+
+.PHONY: basics
+basics:
+ $(CC65) $(CCOPTS) basics/sprite.s -o out/basics/sprite.nes
+ $(CC65) $(CCOPTS) basics/input.s -o out/basics/input.nes
-out/%.nes: examples/%.s
- $(CC65) $(CCOPTS) $< -o $@
+.PHONY: space
+space:
+ @cd space && CC65=$(CC65) CCOPTS="$(CCOPTS)" $(MAKE)
+ @mv space/space.nes out/