-
Notifications
You must be signed in to change notification settings - Fork 107
/
Makefile
33 lines (25 loc) · 1.01 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
KIPS := ldn_mitm
NROS := ldnmitm_config
SUBFOLDERS := Atmosphere-libs/libstratosphere $(KIPS) $(NROS) overlay
TOPTARGETS := all clean
OUTDIR := out
SD_ROOT := $(OUTDIR)/sd
NRO_DIR := $(SD_ROOT)/switch/ldnmitm_config
TITLE_DIR := $(SD_ROOT)/atmosphere/contents/4200000000000010
OVERLAY_DIR := $(SD_ROOT)/switch/.overlays
$(TOPTARGETS): PACK
$(SUBFOLDERS):
$(MAKE) -C $@ $(MAKECMDGOALS)
$(KIPS): Atmosphere-libs/libstratosphere
#---------------------------------------------------------------------------------
PACK: $(SUBFOLDERS)
@ mkdir -p $(NRO_DIR)
@ mkdir -p $(TITLE_DIR)/flags
@ mkdir -p $(OVERLAY_DIR)
@ cp ldnmitm_config/ldnmitm_config.nro $(NRO_DIR)/ldnmitm_config.nro
@ cp ldn_mitm/ldn_mitm.nsp $(TITLE_DIR)/exefs.nsp
@ cp overlay/overlay.ovl $(OVERLAY_DIR)/ldnmitm_config.ovl
@ cp ldn_mitm/res/toolbox.json $(TITLE_DIR)/toolbox.json
@ touch $(TITLE_DIR)/flags/boot2.flag
#---------------------------------------------------------------------------------
.PHONY: $(TOPTARGETS) $(SUBFOLDERS)