Files
rgbds/test/patches/ucity.patch
Sylvie 7326cc6875 Verify ROM hashes for all CI test projects (#1384)
Ucity and Libbet build files in a nondeterministic order, which
we have to patch to sort consistently for reproducible builds.
2024-03-28 22:37:33 -04:00

35 lines
1.2 KiB
Diff

diff --git a/Makefile b/Makefile
index 22c65e9..fce4930 100644
--- a/Makefile
+++ b/Makefile
@@ -44,14 +44,14 @@ BIN := $(NAME).$(EXT)
COMPAT_BIN := $(NAME)_compat.$(EXT)
# List of relative paths to all folders and subfolders with code or data.
-SOURCE_ALL_DIRS := $(shell find $(SOURCE) -type d -print)
+SOURCE_ALL_DIRS := $(sort $(shell find $(SOURCE) -type d -print))
# All files with extension asm are assembled.
-ASMFILES := $(foreach dir,$(SOURCE_ALL_DIRS),$(wildcard $(dir)/*.asm))
+ASMFILES := $(foreach dir,$(SOURCE_ALL_DIRS),$(sort $(wildcard $(dir)/*.asm)))
# List of include directories: All source and data folders.
# A '/' is appended to the path.
-INCLUDES := $(foreach dir,$(SOURCE_ALL_DIRS),-i$(dir)/)
+INCLUDES := $(foreach dir,$(SOURCE_ALL_DIRS),-I$(dir)/)
# Prepare object paths from source files.
OBJ := $(ASMFILES:.asm=.obj)
@@ -72,10 +72,9 @@ clean:
@echo rm $(OBJ) $(BIN) $(COMPAT_BIN) $(NAME).sym $(NAME).map
@rm -f $(OBJ) $(BIN) $(COMPAT_BIN) $(NAME).sym $(NAME).map
-# TODO: Remove the -h when RGBASM is updated to remove it
%.obj : %.asm
@echo rgbasm $<
- @$(RGBASM) $(INCLUDES) -h -E -o$@ $<
+ @$(RGBASM) $(INCLUDES) -E -o$@ $<
$(BIN): $(OBJ)
@echo rgblink $(BIN)