Skip to content

Commit

Permalink
only run asm processor on files that need it
Browse files Browse the repository at this point in the history
  • Loading branch information
RevoSucks committed Sep 21, 2024
1 parent 51a9bcd commit 4ce95f9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,13 @@ build/src/boot/fault_drawer.o: CFLAGS += -trapuv
build/src/C030.o: OPTFLAGS += -Wo,-loopunroll,0
build/src/hal_libc.o: CFLAGS += -signed

# cc & asm-processor
build/src/libleo/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC_OLD) -- $(AS) $(ASFLAGS) --
build/src/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) --
build/src/libleo/%.o: CC := $(CC_OLD)

DECOMP_POKESTADIUM := $(filter-out src/libleo/%,$(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)))
DECOMP_POKESTADIUM_FILTERED := $(patsubst %.c,%.o,$(addprefix build/,$(shell find $(DECOMP_POKESTADIUM) -type f -exec grep -l "GLOBAL_ASM" {} \;)))

# only run asm processor on files that need it.
$(DECOMP_POKESTADIUM_FILTERED): CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) --

###################### Ugly hacksz #############################

Expand Down

0 comments on commit 4ce95f9

Please sign in to comment.