summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoroctorock <79596758+octorock@users.noreply.github.com>2021-11-24 13:02:16 +0100
committeroctorock <79596758+octorock@users.noreply.github.com>2021-11-24 13:02:16 +0100
commitbb425249204147db4aa2c22ff20b68909478ad26 (patch)
tree44e212e150efd808c31b45c3deeeab26762bd014 /Makefile
parent794d5fc97cb01a70c8579dc08962b667edf5a29e (diff)
Fix offset calculation for asset build mode
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
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