Sort CODEFILES in Makefile

Link order matters when generating codesegment*.o. The old sort
order of CODEFILES was OS/file system dependent. Sort the file
paths to ensure consistent linking across environments.
This commit is contained in:
Matt Penny 2023-12-18 14:06:33 -05:00
parent 370edaf377
commit ce239440f3

View file

@ -39,7 +39,7 @@ ASMFILES = $(shell find asm/ -type f -name '*.s')
ASMOBJECTS = $(patsubst %.s, build/%.o, $(ASMFILES)) ASMOBJECTS = $(patsubst %.s, build/%.o, $(ASMFILES))
CODEFILES = $(shell find src/ -type f -name '*.c') CODEFILES = $(shell find src/ -type f -name '*.c' | sort)
ifeq ($(PORTAL64_WITH_GFX_VALIDATOR),1) ifeq ($(PORTAL64_WITH_GFX_VALIDATOR),1)
LCDEFS += -DPORTAL64_WITH_GFX_VALIDATOR LCDEFS += -DPORTAL64_WITH_GFX_VALIDATOR