1
0
mirror of https://github.com/cathery/sys-con.git synced 2024-07-01 01:38:44 +00:00

Update makefile targets

This commit is contained in:
cathery 2020-03-10 21:23:10 +03:00
parent b7d6da217a
commit 5afe0ac4dd
3 changed files with 39 additions and 27 deletions

27
.vscode/tasks.json vendored
View File

@ -5,7 +5,7 @@
"label": "Build Release", "label": "Build Release",
"type": "shell", "type": "shell",
"promptOnClose": true, "promptOnClose": true,
"command": "make -j4", "command": "make -j8",
"presentation": { "presentation": {
"reveal": "always", "reveal": "always",
"panel": "shared" "panel": "shared"
@ -27,7 +27,7 @@
} }
}, },
{ {
"label": "Clean", "label": "Clean only the project files",
"type": "shell", "type": "shell",
"promptOnClose": true, "promptOnClose": true,
"command": "make clean", "command": "make clean",
@ -35,17 +35,18 @@
"reveal": "always", "reveal": "always",
"panel": "shared" "panel": "shared"
}, },
"problemMatcher": { "problemMatcher": []
"owner": "cpp", },
"pattern": { {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "label": "Clean everything",
"file": 1, "type": "shell",
"line": 2, "promptOnClose": true,
"column": 3, "command": "make mrproper",
"severity": 4, "presentation": {
"message": 5 "reveal": "always",
} "panel": "shared"
} },
"problemMatcher": []
} }
] ]
} }

View File

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

View File

@ -1,5 +1,5 @@
COMPONENTS := libstratosphere AppletCompanion Sysmodule COMPONENTS := libstratosphere AppletCompanion Sysmodule
TOPTARGETS := all clean TOPTARGETS := all clean mrproper
.PHONY: $(TOPTARGETS) $(COMPONENTS) .PHONY: $(TOPTARGETS) $(COMPONENTS)
@ -17,4 +17,6 @@ Sysmodule: libstratosphere
clean: clean:
$(MAKE) -C AppletCompanion clean $(MAKE) -C AppletCompanion clean
$(MAKE) -C Sysmodule clean $(MAKE) -C Sysmodule clean
mrproper: clean
$(MAKE) -C libstratosphere clean $(MAKE) -C libstratosphere clean