From 149020464517ff3d021eef5ccd50d3939ad463e6 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 24 Oct 2023 17:40:19 +0200 Subject: Lay out a proper structure for the project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'Makefile') 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/ -- cgit v1.2.3