aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2023-10-24 17:40:19 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-02-04 20:58:36 +0100
commit149020464517ff3d021eef5ccd50d3939ad463e6 (patch)
tree056ec1919fe0c0d515e7a0a414916307b768ef84 /Makefile
parentbe2414f5b11b182998fca7e87712ff0502c8ee93 (diff)
downloadcode.nes-149020464517ff3d021eef5ccd50d3939ad463e6.tar.gz
code.nes-149020464517ff3d021eef5ccd50d3939ad463e6.zip
Lay out a proper structure for the project
Let's divide things by topic instead of a broad "examples" directory. This will allow for simple files to co-exist together with full-blown projects. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
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/