diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-03-06 16:10:32 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-03-06 16:10:32 +0100 |
| commit | 1efe10cf62ebf9f0749dd3329ea52f4c9ac2e96b (patch) | |
| tree | b63eceba50fcf9cbe5a16f320c70b162b3f2402b | |
| parent | f3737201eda72e51730a0762be98598fee08d86b (diff) | |
| download | jetpac.nes-1efe10cf62ebf9f0749dd3329ea52f4c9ac2e96b.tar.gz jetpac.nes-1efe10cf62ebf9f0749dd3329ea52f4c9ac2e96b.zip | |
Add the 'each' and 'release' make targets
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à <mssola@mssola.com>
| -rw-r--r-- | .github/workflows/build.yml | 2 | ||||
| -rw-r--r-- | Makefile | 31 |
2 files changed, 32 insertions, 1 deletions
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 @@ -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" "$@" |
