From 6d839ac0452f03d867f89cf646c312595d2e976f Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sun, 12 Jan 2025 18:11:36 +0100 Subject: [PATCH] spec_includes/ -> spec/, spec -> spec/spec --- Makefile | 16 +++++++-------- {spec_includes => spec}/boot_libultra_gc.inc | 0 .../boot_libultra_ique.inc | 0 {spec_includes => spec}/boot_libultra_n64.inc | 0 {spec_includes => spec}/code_libultra_gc.inc | 0 .../code_libultra_ique.inc | 0 {spec_includes => spec}/code_libultra_n64.inc | 0 {spec_includes => spec}/overlays_gc.inc | 0 {spec_includes => spec}/overlays_n64_ique.inc | 0 {spec_includes => spec}/scenes_gc_ique.inc | 0 {spec_includes => spec}/scenes_n64.inc | 0 spec => spec/spec | 20 +++++++++---------- 12 files changed, 18 insertions(+), 18 deletions(-) rename {spec_includes => spec}/boot_libultra_gc.inc (100%) rename {spec_includes => spec}/boot_libultra_ique.inc (100%) rename {spec_includes => spec}/boot_libultra_n64.inc (100%) rename {spec_includes => spec}/code_libultra_gc.inc (100%) rename {spec_includes => spec}/code_libultra_ique.inc (100%) rename {spec_includes => spec}/code_libultra_n64.inc (100%) rename {spec_includes => spec}/overlays_gc.inc (100%) rename {spec_includes => spec}/overlays_n64_ique.inc (100%) rename {spec_includes => spec}/scenes_gc_ique.inc (100%) rename {spec_includes => spec}/scenes_n64.inc (100%) rename spec => spec/spec (99%) diff --git a/Makefile b/Makefile index 8563efa59e2..aaa35b574aa 100644 --- a/Makefile +++ b/Makefile @@ -410,8 +410,8 @@ MAP := $(ROM:.z64=.map) LDSCRIPT := $(ROM:.z64=.ld) # description of ROM segments -SPEC := spec -SPEC_INCLUDES := $(wildcard spec_includes/*.inc) +SPEC := spec/spec +SPEC_INCLUDES := $(wildcard spec/*.inc) SRC_DIRS := $(shell find src -type d) UNDECOMPILED_DATA_DIRS := $(shell find data -type d) @@ -493,7 +493,7 @@ ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_BIN_EXTRACTED:.bin=.bin.inc.c),$(f: $(foreach f,$(ASSET_FILES_BIN_COMMITTED:.bin=.bin.inc.c),$(BUILD_DIR)/$f) # Find all .o files included in the spec -SPEC_O_FILES := $(shell $(CPP) $(CPPFLAGS) $(SPEC) | $(BUILD_DIR_REPLACE) | sed -n -E 's/^[ \t]*include[ \t]*"([a-zA-Z0-9/_.-]+\.o)"/\1/p') +SPEC_O_FILES := $(shell $(CPP) $(CPPFLAGS) -I. $(SPEC) | $(BUILD_DIR_REPLACE) | sed -n -E 's/^[ \t]*include[ \t]*"([a-zA-Z0-9/_.-]+\.o)"/\1/p') # Split out reloc files O_FILES := $(filter-out %_reloc.o,$(SPEC_O_FILES)) @@ -843,10 +843,10 @@ $(O_FILES): | asset_files .PHONY: o_files asset_files -$(BUILD_DIR)/$(SPEC): $(SPEC) $(SPEC_INCLUDES) - $(CPP) $(CPPFLAGS) $< | $(BUILD_DIR_REPLACE) > $@ +$(BUILD_DIR)/spec: $(SPEC) $(SPEC_INCLUDES) + $(CPP) $(CPPFLAGS) -I. $< | $(BUILD_DIR_REPLACE) > $@ -$(LDSCRIPT): $(BUILD_DIR)/$(SPEC) +$(LDSCRIPT): $(BUILD_DIR)/spec $(MKLDSCRIPT) $< $@ $(BUILD_DIR)/undefined_syms.txt: undefined_syms.txt @@ -927,7 +927,7 @@ endif $(BUILD_DIR)/src/code/z_message_z_game_over.o: $(BUILD_DIR)/src/code/z_message.o $(BUILD_DIR)/src/code/z_game_over.o $(LD) -r -T linker_scripts/data_with_rodata.ld -o $@ $^ -$(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)/$(SPEC) +$(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)/spec $(MKDMADATA) $< $(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt # Dependencies for files that may include the dmadata header automatically generated from the spec file @@ -962,7 +962,7 @@ endif $(LD) -r -T linker_scripts/data_with_rodata.ld -o $@ $(@:.o=.tmp) @$(OBJDUMP) $(OBJDUMP_FLAGS) $@ > $(@:.o=.s) -$(BUILD_DIR)/src/overlays/%_reloc.o: $(BUILD_DIR)/$(SPEC) +$(BUILD_DIR)/src/overlays/%_reloc.o: $(BUILD_DIR)/spec $(FADO) $$(tools/reloc_prereq $< $(notdir $*)) -n $(notdir $*) -o $(@:.o=.s) -M $(@:.o=.d) $(AS) $(ASFLAGS) $(@:.o=.s) -o $@ diff --git a/spec_includes/boot_libultra_gc.inc b/spec/boot_libultra_gc.inc similarity index 100% rename from spec_includes/boot_libultra_gc.inc rename to spec/boot_libultra_gc.inc diff --git a/spec_includes/boot_libultra_ique.inc b/spec/boot_libultra_ique.inc similarity index 100% rename from spec_includes/boot_libultra_ique.inc rename to spec/boot_libultra_ique.inc diff --git a/spec_includes/boot_libultra_n64.inc b/spec/boot_libultra_n64.inc similarity index 100% rename from spec_includes/boot_libultra_n64.inc rename to spec/boot_libultra_n64.inc diff --git a/spec_includes/code_libultra_gc.inc b/spec/code_libultra_gc.inc similarity index 100% rename from spec_includes/code_libultra_gc.inc rename to spec/code_libultra_gc.inc diff --git a/spec_includes/code_libultra_ique.inc b/spec/code_libultra_ique.inc similarity index 100% rename from spec_includes/code_libultra_ique.inc rename to spec/code_libultra_ique.inc diff --git a/spec_includes/code_libultra_n64.inc b/spec/code_libultra_n64.inc similarity index 100% rename from spec_includes/code_libultra_n64.inc rename to spec/code_libultra_n64.inc diff --git a/spec_includes/overlays_gc.inc b/spec/overlays_gc.inc similarity index 100% rename from spec_includes/overlays_gc.inc rename to spec/overlays_gc.inc diff --git a/spec_includes/overlays_n64_ique.inc b/spec/overlays_n64_ique.inc similarity index 100% rename from spec_includes/overlays_n64_ique.inc rename to spec/overlays_n64_ique.inc diff --git a/spec_includes/scenes_gc_ique.inc b/spec/scenes_gc_ique.inc similarity index 100% rename from spec_includes/scenes_gc_ique.inc rename to spec/scenes_gc_ique.inc diff --git a/spec_includes/scenes_n64.inc b/spec/scenes_n64.inc similarity index 100% rename from spec_includes/scenes_n64.inc rename to spec/scenes_n64.inc diff --git a/spec b/spec/spec similarity index 99% rename from spec rename to spec/spec index ef63420f3d1..95fb0229f61 100644 --- a/spec +++ b/spec/spec @@ -60,11 +60,11 @@ beginseg // libultra #if PLATFORM_N64 -#include "spec_includes/boot_libultra_n64.inc" +#include "boot_libultra_n64.inc" #elif PLATFORM_GC -#include "spec_includes/boot_libultra_gc.inc" +#include "boot_libultra_gc.inc" #elif PLATFORM_IQUE -#include "spec_includes/boot_libultra_ique.inc" +#include "boot_libultra_ique.inc" #endif // libgcc @@ -752,11 +752,11 @@ beginseg // libultra #if PLATFORM_N64 -#include "spec_includes/code_libultra_n64.inc" +#include "code_libultra_n64.inc" #elif PLATFORM_GC -#include "spec_includes/code_libultra_gc.inc" +#include "code_libultra_gc.inc" #elif PLATFORM_IQUE -#include "spec_includes/code_libultra_ique.inc" +#include "code_libultra_ique.inc" #endif // libc @@ -965,9 +965,9 @@ endseg // Overlays for most actors and effects are reordered between versions. On N64 and iQue, // the overlays are in some arbitrary order, while on GameCube they are sorted alphabetically. #if !PLATFORM_GC -#include "spec_includes/overlays_n64_ique.inc" +#include "overlays_n64_ique.inc" #else -#include "spec_includes/overlays_gc.inc" +#include "overlays_gc.inc" #endif beginseg @@ -4891,9 +4891,9 @@ endseg // Scene files are reordered between versions. On GameCube and iQue, dungeon scenes // have been moved to the beginning. #if PLATFORM_N64 -#include "spec_includes/scenes_n64.inc" +#include "scenes_n64.inc" #else -#include "spec_includes/scenes_gc_ique.inc" +#include "scenes_gc_ique.inc" #endif beginseg