[WiiU] Add quiet support to makefile

Inspired by Makefile.win; this commit will hide compiler commands from
being printed to the shell. Old behaviour can be restored by running
"make -f Makefile.wiiu V=1". Should make it harder to miss warnings now.
This commit is contained in:
Ash 2017-11-04 16:19:49 +11:00
parent c96a9dbf76
commit e41b8db3e2
No known key found for this signature in database
GPG Key ID: F8C85A8C836C0A7E

View File

@ -5,6 +5,10 @@ DEBUG = 0
GRIFFIN_BUILD = 0
WHOLE_ARCHIVE_LINK = 0
ifneq ($(V), 1)
Q := @
endif
PC_DEVELOPMENT_IP_ADDRESS ?=
PC_DEVELOPMENT_TCP_PORT ?=
@ -202,41 +206,50 @@ all: $(TARGETS)
%.o: %.cpp
%.o: %.cpp %.depend
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
@$(if $(Q), echo CXX $<,)
$(Q)$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS)
$(Q)$(POSTCOMPILE)
%.o: %.c
%.o: %.c %.depend
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
@$(if $(Q), echo CC $<,)
$(Q)$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
$(Q)$(POSTCOMPILE)
%.o: %.S
%.o: %.S %.depend
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
@$(if $(Q), echo AS $<,)
$(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
$(Q)$(POSTCOMPILE)
%.o: %.s
%.o: %.s %.depend
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
@$(if $(Q), echo AS $<,)
$(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
$(Q)$(POSTCOMPILE)
%.a:
$(AR) -rc $@ $^
@$(if $(Q), echo AR $<,)
$(Q)$(AR) -rc $@ $^
%.depend: ;
$(ELF2RPL):
$(MAKE) -C wiiu/wut/elf2rpl/
@$(if $(Q), echo MAKE $@,)
$(Q)$(MAKE) -C wiiu/wut/elf2rpl/
$(TARGET).elf: $(OBJ) $(HBL_ELF_OBJ) libretro_wiiu.a wiiu/link_elf.ld
$(LD) $(OBJ) $(HBL_ELF_OBJ) $(LDFLAGS) $(HBL_ELF_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
@$(if $(Q), echo LD $@,)
$(Q)$(LD) $(OBJ) $(HBL_ELF_OBJ) $(LDFLAGS) $(HBL_ELF_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.ld
$(LD) $(OBJ) $(RPX_OBJ) $(LDFLAGS) $(RPX_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
@$(if $(Q), echo LD $@,)
$(Q)$(LD) $(OBJ) $(RPX_OBJ) $(LDFLAGS) $(RPX_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
$(TARGET).rpx: $(TARGET).rpx.elf $(ELF2RPL)
-$(ELF2RPL) $(TARGET).rpx.elf $@
@$(if $(Q), echo ELF2RPL $@,)
$(Q)-$(ELF2RPL) $(TARGET).rpx.elf $@
clean:
rm -f $(OBJ) $(RPX_OBJ) $(HBL_ELF_OBJ) $(TARGET).elf $(TARGET).rpx.elf $(TARGET).rpx