-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
41 lines (32 loc) · 1.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
COMPONENTS := Server Manager Client
TOPTARGETS := all clean
.PHONY: $(TOPTARGETS) $(COMPONENTS)
TOPDIR ?= $(CURDIR)
IN_SERVER_DIR := Server/
IN_MANAGER_DIR := Manager/SwitchPresence-Rewritten-Manager.nro
OUT_DIR := out
OUT_SERVER_DIR := Sysmodule
OUT_MANAGER_DIR :=
all: $(COMPONENTS)
rm -rf $(OUT_DIR)
# Sysmodule files
mkdir -p $(OUT_DIR)/$(OUT_SERVER_DIR)/atmosphere/contents/0100000000000464/flags
touch $(OUT_DIR)/$(OUT_SERVER_DIR)/atmosphere/contents/0100000000000464/flags/boot2.flag
cp $(IN_SERVER_DIR)SwitchPresence-Rewritten.nsp $(OUT_DIR)/$(OUT_SERVER_DIR)/atmosphere/contents/0100000000000464/exefs.nsp
cp $(IN_SERVER_DIR)toolbox.json $(OUT_DIR)/$(OUT_SERVER_DIR)/atmosphere/contents/0100000000000464/toolbox.json
# Manager files
cp $(IN_MANAGER_DIR) $(OUT_DIR)/$(OUT_MANAGER_DIR)/SwitchPresence-Rewritten-Manager.nro
# Zipping up files
@echo Zipping files now...
cd $(TOPDIR)/$(OUT_DIR)/$(OUT_SERVER_DIR); zip -r $(TOPDIR)/$(OUT_DIR)/Sysmodule.zip ./; cd $(TOPDIR);
rm -rf $(TOPDIR)/$(OUT_DIR)/$(OUT_SERVER_DIR)
@echo [ZIPPED] All the files have been zipped and placed in $(OUT_DIR)/.
@echo [DONE]
Manager:
$(MAKE) -C $@
Server:
$(MAKE) -C $@
clean:
$(MAKE) -C Server clean
$(MAKE) -C Manager clean
rm -rf $(OUT_DIR)