Skip to content

Commit 4ce95f9

Browse files
committed
only run asm processor on files that need it
1 parent 51a9bcd commit 4ce95f9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Makefile

+7-3
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,13 @@ build/src/boot/fault_drawer.o: CFLAGS += -trapuv
240240
build/src/C030.o: OPTFLAGS += -Wo,-loopunroll,0
241241
build/src/hal_libc.o: CFLAGS += -signed
242242

243-
# cc & asm-processor
244-
build/src/libleo/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC_OLD) -- $(AS) $(ASFLAGS) --
245-
build/src/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) --
243+
build/src/libleo/%.o: CC := $(CC_OLD)
244+
245+
DECOMP_POKESTADIUM := $(filter-out src/libleo/%,$(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)))
246+
DECOMP_POKESTADIUM_FILTERED := $(patsubst %.c,%.o,$(addprefix build/,$(shell find $(DECOMP_POKESTADIUM) -type f -exec grep -l "GLOBAL_ASM" {} \;)))
247+
248+
# only run asm processor on files that need it.
249+
$(DECOMP_POKESTADIUM_FILTERED): CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) --
246250

247251
###################### Ugly hacksz #############################
248252

0 commit comments

Comments
 (0)