Skip to content

Commit

Permalink
supress IRX compilation commands if not debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps authored Jan 31, 2024
1 parent 945d787 commit ae93f9f
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions iop/Rules.make
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ DEBUG ?= 0
ifneq ($(DEBUG), 0)
$(info -- $(IOP_BIN): compiling with debug level $(DEBUG))
IOP_CFLAGS += -DDEBUG=$(DEBUG)
else
.SILENT:
endif

IOP_INCS := $(IOP_INCS) -I$(PS2SDK)/iop/include -I$(PS2SDK)/common/include -Iinclude
Expand All @@ -40,23 +42,29 @@ BIN2O = $(PS2SDK)/bin/bin2o
# Externally defined variables: IOP_BIN, IOP_OBJS, IOP_LIB

%.o : %.c
$(IOP_CC) $(IOP_CFLAGS) -c $< -o $@
@echo IOPCC $@
@$(IOP_CC) $(IOP_CFLAGS) -c $< -o $@

%.o : %.S
$(IOP_CC) $(IOP_CFLAGS) $(IOP_INCS) -c $< -o $@
@echo IOPCC $@
@$(IOP_CC) $(IOP_CFLAGS) $(IOP_INCS) -c $< -o $@

%.o : %.s
$(IOP_AS) $(IOP_ASFLAGS) $< -o $@
@echo IOPAS $@
@$(IOP_AS) $(IOP_ASFLAGS) $< -o $@

#Rules for the PS2SDK-styled projects (objects in objs/, binary in bin/)
$(IOP_OBJS_DIR)%.o : $(IOP_SRC_DIR)%.c
$(IOP_CC) $(IOP_CFLAGS) -c $< -o $@
@echo IOPCC $@
@$(IOP_CC) $(IOP_CFLAGS) -c $< -o $@

$(IOP_OBJS_DIR)%.o : $(IOP_SRC_DIR)%.S
$(IOP_CC) $(IOP_CFLAGS) $(IOP_INCS) -c $< -o $@
@echo IOPCC $@
@$(IOP_CC) $(IOP_CFLAGS) $(IOP_INCS) -c $< -o $@

$(IOP_OBJS_DIR)%.o : $(IOP_SRC_DIR)%.s
$(IOP_AS) $(IOP_ASFLAGS) $< -o $@
@echo IOPAS $@
@$(IOP_AS) $(IOP_ASFLAGS) $< -o $@

# A rule to build imports.lst.
$(IOP_OBJS_DIR)%.o : $(IOP_SRC_DIR)%.lst
Expand Down

0 comments on commit ae93f9f

Please sign in to comment.