1
0
mirror of https://github.com/cathery/sys-con.git synced 2024-07-03 02:18:43 +00:00

Quieter makefiles

This commit is contained in:
cathery 2020-12-08 16:44:45 +03:00
parent c9012b7c95
commit dd5cf85f69
4 changed files with 31 additions and 37 deletions

View File

@ -5,24 +5,24 @@ OUT_DIR := out
COMMON_DIR := common COMMON_DIR := common
all: build all: build
rm -rf $(OUT_DIR) @rm -rf $(OUT_DIR)
mkdir -p $(OUT_DIR)/atmosphere/contents/690000000000000D/flags @mkdir -p $(OUT_DIR)/atmosphere/contents/690000000000000D/flags
mkdir -p $(OUT_DIR)/config/sys-con @mkdir -p $(OUT_DIR)/config/sys-con
mkdir -p $(OUT_DIR)/switch/ @mkdir -p $(OUT_DIR)/switch/
touch $(OUT_DIR)/atmosphere/contents/690000000000000D/flags/boot2.flag @touch $(OUT_DIR)/atmosphere/contents/690000000000000D/flags/boot2.flag
cp $(SOURCE_DIR)/Sysmodule/sys-con.nsp $(OUT_DIR)/atmosphere/contents/690000000000000D/exefs.nsp @cp $(SOURCE_DIR)/Sysmodule/sys-con.nsp $(OUT_DIR)/atmosphere/contents/690000000000000D/exefs.nsp
cp $(SOURCE_DIR)/AppletCompanion/sys-con.nro $(OUT_DIR)/switch/sys-con.nro @cp $(SOURCE_DIR)/AppletCompanion/sys-con.nro $(OUT_DIR)/switch/sys-con.nro
cp -r $(COMMON_DIR)/. $(OUT_DIR)/ @cp -r $(COMMON_DIR)/. $(OUT_DIR)/
@echo [DONE] sys-con compiled successfully. All files have been placed in $(OUT_DIR)/ @echo [DONE] sys-con compiled successfully. All files have been placed in $(OUT_DIR)/
build: build:
$(MAKE) -C $(SOURCE_DIR) @$(MAKE) --no-print-directory -C $(SOURCE_DIR)
clean: clean:
$(MAKE) -C $(SOURCE_DIR) clean @$(MAKE) --no-print-directory -C $(SOURCE_DIR) clean
rm -rf $(OUT_DIR) @rm -rf $(OUT_DIR)
mrproper: mrproper:
$(MAKE) -C $(SOURCE_DIR) mrproper @$(MAKE) --no-print-directory -C $(SOURCE_DIR) mrproper
rm -rf $(OUT_DIR) @rm -rf $(OUT_DIR)

View File

@ -161,31 +161,26 @@ endif
all: $(BUILD) all: $(BUILD)
$(BUILD): $(BUILD):
@echo building applet companion ...
@[ -d $@ ] || mkdir -p $@ @[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory \ @$(MAKE) --no-print-directory \
-C $@ -f $(CURDIR)/Makefile \ -C $@ -f $(CURDIR)/Makefile \
makeNRO applet
clean: clean:
@echo cleaning applet companion ...
@rm -fr $(BUILD) $(TARGET).nro $(TARGET).nacp $(TARGET).elf @rm -fr $(BUILD) $(TARGET).nro $(TARGET).nacp $(TARGET).elf
# Makefile commands # Makefile commands
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
else else
.PHONY: makeNRO makeNSP .PHONY: applet
DEPENDS := $(OFILES:.o=.d) DEPENDS := $(OFILES:.o=.d)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# main targets # main targets
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
makeNRO: $(OUTPUT).nro
makeNSP: $(OUTPUT).nsp
#TODO: add an option to make exefs.nsp instead of $(OUTPUT).nsp #TODO: add an option to make exefs.nsp instead of $(OUTPUT).nsp
applet: $(OUTPUT).nro
ifeq ($(strip $(NO_NACP)),) ifeq ($(strip $(NO_NACP)),)
$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp $(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp
@ -193,12 +188,6 @@ else
$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nro : $(OUTPUT).elf
endif endif
$(OUTPUT).nsp : $(OUTPUT).nso $(OUTPUT).npdm
$(OUTPUT).nso : $(OUTPUT).elf
$(OUTPUT).elf : $(OFILES) $(OUTPUT).elf : $(OFILES)
$(OFILES_SRC) : $(HFILES_BIN) $(OFILES_SRC) : $(HFILES_BIN)

View File

@ -6,17 +6,23 @@ TOPTARGETS := all clean mrproper
all: $(COMPONENTS) all: $(COMPONENTS)
libstratosphere: libstratosphere:
$(MAKE) -C $@ @echo Building libstratosphere...
@$(MAKE) --no-print-directory -C $@
AppletCompanion: AppletCompanion:
$(MAKE) -C $@ @echo Building applet companion...
@$(MAKE) --no-print-directory -C $@
Sysmodule: libstratosphere Sysmodule: libstratosphere
$(MAKE) -C $@ @echo Building sysmodule...
@$(MAKE) --no-print-directory -C $@
clean: clean:
$(MAKE) -C AppletCompanion clean @echo Cleaning applet companion...
$(MAKE) -C Sysmodule clean @$(MAKE) --no-print-directory -C AppletCompanion clean
@echo Cleaning sysmodule...
@$(MAKE) --no-print-directory -C Sysmodule clean
mrproper: clean mrproper: clean
$(MAKE) -C libstratosphere clean @echo Cleaning libstratosphere...
@$(MAKE) --no-print-directory -C libstratosphere clean

View File

@ -88,24 +88,23 @@ all: $(BUILD)
$(BUILD): $(BUILD):
@[ -d $@ ] || mkdir -p $@ @[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile sysmodule
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
clean: clean:
@echo clean ...
@rm -fr $(BUILD) $(TARGET).nsp $(TARGET).npdm $(TARGET).nso $(TARGET).elf @rm -fr $(BUILD) $(TARGET).nsp $(TARGET).npdm $(TARGET).nso $(TARGET).elf
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
else else
.PHONY: all .PHONY: sysmodule
DEPENDS := $(OFILES:.o=.d) DEPENDS := $(OFILES:.o=.d)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# main targets # main targets
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
all : $(OUTPUT).nsp sysmodule : $(OUTPUT).nsp
ifeq ($(strip $(APP_JSON)),) ifeq ($(strip $(APP_JSON)),)
$(OUTPUT).nsp : $(OUTPUT).nso $(OUTPUT).nsp : $(OUTPUT).nso