Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec_includes/ -> spec/, spec -> spec/spec #2422

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Dragorn421 marked this conversation as resolved.
Show resolved Hide resolved
$(CPP) $(CPPFLAGS) -I. $< | $(BUILD_DIR_REPLACE) > $@

$(LDSCRIPT): $(BUILD_DIR)/$(SPEC)
$(LDSCRIPT): $(BUILD_DIR)/spec
$(MKLDSCRIPT) $< $@

$(BUILD_DIR)/undefined_syms.txt: undefined_syms.txt
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 $@

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Copy link
Collaborator

@fig02 fig02 Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This really should have been a comment for #2399

But _gc_ique is pretty confusing. I figured after some more thought that it means "gc AND ique", but seeing it alongside _ique_n64 makes it seem like its saying there is a gamecube and n64 ique variant lol

Im not sure how to address this other than putting the word "and". Also understand if this conversation/change should happen elsewhere.

File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions spec → spec/spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down