From bb425249204147db4aa2c22ff20b68909478ad26 Mon Sep 17 00:00:00 2001 From: octorock <79596758+octorock@users.noreply.github.com> Date: Wed, 24 Nov 2021 13:02:16 +0100 Subject: Fix offset calculation for asset build mode --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ba320ada..281f4bfd 100644 --- a/Makefile +++ b/Makefile @@ -149,7 +149,7 @@ SUBDIRS := $(sort $(dir $(OBJS))) $(shell mkdir -p $(SUBDIRS)) -.PHONY: all setup clean-tools mostlyclean clean tidy tools extractassets +.PHONY: all setup clean-tools mostlyclean clean tidy tools extractassets buildassets custom MAKEFLAGS += --no-print-directory @@ -162,6 +162,9 @@ all: build/extracted_assets_$(GAME_VERSION) target: $(ROM) @$(SHA1) $(BUILD_NAME).sha1 +custom: buildassets + @$(MAKE) target GAME_VERSION=$(GAME_VERSION) + # kept for backwards compat compare: $(ROM) @$(SHA1) $(BUILD_NAME).sha1 @@ -173,11 +176,11 @@ setup: tools tools: $(GFX) $(GFX) $(AIF) $(MID) $(SCANINC) $(PREPROC) $(FIX) $(ASSET_PROCESSOR) tools/bin/agb2mid tools/bin/tmc_strings tools/bin/bin2c &: - mkdir tools/cmake-build + mkdir -p tools/cmake-build unset CC CXX AS LD && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=tools -S tools -B tools/cmake-build cmake --build tools/cmake-build -j cmake --install tools/cmake-build - + # Automatically extract binary data build/extracted_assets_%: $(ASSET_CONFIGS) $(TRANSLATIONS) $(ASSET_PROCESSOR) extract $(GAME_VERSION) $(ASSET_BUILDDIR) @@ -187,6 +190,10 @@ build/extracted_assets_%: $(ASSET_CONFIGS) $(TRANSLATIONS) extractassets: $(ASSET_PROCESSOR) convert $(GAME_VERSION) $(ASSET_BUILDDIR) +# Build the assets from the human readable form +buildassets: + $(ASSET_PROCESSOR) build $(GAME_VERSION) $(ASSET_BUILDDIR) + mostlyclean: tidy rm -f sound/direct_sound_samples/*.bin rm -f $(SONG_OBJS) $(MID_SUBDIR)/*.s -- cgit v1.2.3