From 7b8a72f3db4b8dafcbf0f14535167894c66b6091 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Sun, 12 Mar 2023 23:19:28 +0000 Subject: [PATCH] makefile improvements --- .github/workflows/build.yml | 3 ++- Makefile | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1d526c9..dc17021f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: mkdir build mkdir output # TODO: split this to use params for each flashcart type. - make -j all + make menu - name: Upload artifact uses: actions/upload-artifact@v3 @@ -80,6 +80,7 @@ jobs: - name: Finalize rom run: | + # make all python ./tools/sc64/minify.py ./build/N64FlashcartMenu.elf ./output/N64FlashcartMenu.z64 ./output/sc64menu.n64 continue-on-error: false diff --git a/Makefile b/Makefile index 55a1205f..7e370b06 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.DEFAULT_GOAL := all +.DEFAULT_GOAL := menu EXE_NAME = N64FlashcartMenu @@ -32,10 +32,14 @@ $(BUILD_DIR)/$(EXE_NAME).elf: $(OBJS) $(EXE_NAME).z64: N64_ROM_TITLE=$(EXE_NAME) -all: $(EXE_NAME).z64 - $(shell mkdir $(OUTPUT_DIR)) - $(shell mv $(EXE_NAME).z64 $(OUTPUT_DIR)) + menu: $(EXE_NAME).z64 + $(shell mkdir -p $(OUTPUT_DIR)) + $(shell mv $(EXE_NAME).z64 $(OUTPUT_DIR)) + +sc64_minify: $(shell python3 ./tools/sc64/minify.py $(BUILD_DIR)/$(EXE_NAME).elf $(OUTPUT_DIR)/N64FlashcartMenu.z64 $(OUTPUT_DIR)/sc64menu.n64) + +all: menu sc64_minify .PHONY: all clean: