From 1efe10cf62ebf9f0749dd3329ea52f4c9ac2e96b Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 6 Mar 2026 16:10:32 +0100 Subject: Add the 'each' and 'release' make targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'each' target is used to dump all the different combinations into my Everdrive so to test on real hardware. The 'release' target is used so the "DEV" version of the ROM does not make it into the releases page from Github. Signed-off-by: Miquel Sabaté Solà --- .github/workflows/build.yml | 2 +- Makefile | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44c9761..5304de0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: rubocop bin/ --format github - name: Main task - run: V=1 make all + run: V=1 make release - name: Clean old release assets run: gh release delete latest --yes --cleanup-tag || true diff --git a/Makefile b/Makefile index 668dab8..84594b9 100644 --- a/Makefile +++ b/Makefile @@ -35,10 +35,17 @@ HAS_RUBY := $(shell command -v $(RUBY) >/dev/null 2>&1 && echo true || echo fals ## # Variables for building the game. LEVEL ?= 0 +LEVELS := $(shell seq 0 7) + +## +# all: clean the workspace and build all ROM files. .PHONY: all all: clean deps build +## +# clean & deps: clean the workspace and check that all dependencies are met. + .PHONY: clean clean: @rm -rf out @@ -51,6 +58,9 @@ clean: deps: @which $(CC65) >/dev/null 2>/dev/null || (echo "ERROR: '$(CC65)' not found." && false) +## +# Generate configuration values in 'config/values/'. + .PHONY: gen-values gen-values: ifeq ($(HAS_RUBY),true) @@ -60,6 +70,10 @@ else @(Q) echo "WARNING: '$(RUBY)' not found; files under 'config/values/' will not be generated." endif +## +# build: create a ROM file for NTSC and PAL, while creating a DEV one for +# testing purposes. + .PHONY: build build: gen-values build-partial build-pal build-full @@ -91,3 +105,20 @@ build-pal: $(E) " CC jetpac (PAL)" $(Q) $(CC65) $(CCOPTS) src/jetpac.s -C config/nrom.cfg -o "out/Jetpac (PAL).nes" 1>/dev/null + +## +# release: generate ROM files which are only interesting for releases. + +release: clean deps gen-values build-full build-pal + +## +# each: create a ROM file for each level. + +EACH_TARGETS := $(foreach i,$(LEVELS),out/jetpac.$(i).nes) + +.PHONY: each +each: clean deps gen-values $(EACH_TARGETS) + +out/jetpac.%.nes: + $(Q) $(MAKE) build-full LEVEL=$* + $(Q) mv "out/Jetpac (NTSC).nes" "$@" -- cgit v1.2.3