Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (45 loc) · 2.11 KB
/
Copy pathMakefile
File metadata and controls
60 lines (45 loc) · 2.11 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
TARGET_TRIPLE := aarch64-nintendo-switch-freestanding
PROGRAM_ID := 0100000000000352
.PHONY: all dev clean emuiibo emuiibo-dev sysmodule sysmodule-dev overlay emuiigen dist dist-dev emuiibo-clean emuiigen-clean
all: emuiibo emuiigen
dev: emuiibo-dev emuiigen
clean: emuiibo-clean emuiigen-clean
emuiibo: sysmodule overlay dist
emuiibo-dev: sysmodule-dev overlay dist-dev
sysmodule:
@cd emuiibo && cargo update && cargo nx build --release
sysmodule-dev:
@cd emuiibo && cargo update && cargo nx build
overlay:
@$(MAKE) -C overlay/
dist: sysmodule overlay
@rm -rf $(CURDIR)/SdOut
@mkdir -p $(CURDIR)/SdOut/atmosphere/contents/$(PROGRAM_ID)/flags
@touch $(CURDIR)/SdOut/atmosphere/contents/$(PROGRAM_ID)/flags/boot2.flag
@cp $(CURDIR)/emuiibo/target/$(TARGET_TRIPLE)/release/emuiibo.nsp $(CURDIR)/SdOut/atmosphere/contents/$(PROGRAM_ID)/exefs.nsp
@cp $(CURDIR)/emuiibo/toolbox.json $(CURDIR)/SdOut/atmosphere/contents/$(PROGRAM_ID)/toolbox.json
@mkdir -p $(CURDIR)/SdOut/switch/.overlays
@cp $(CURDIR)/overlay/emuiibo.ovl $(CURDIR)/SdOut/switch/.overlays/emuiibo.ovl
@mkdir -p $(CURDIR)/SdOut/emuiibo/overlay
@cp -r $(CURDIR)/overlay/lang $(CURDIR)/SdOut/emuiibo/overlay/
@zip -r $(CURDIR)/emuiibo.zip SdOut
@echo "Output created at $(CURDIR)/SdOut"
dist-dev: sysmodule-dev overlay
@rm -rf $(CURDIR)/SdOut
@mkdir -p $(CURDIR)/SdOut/atmosphere/contents/$(PROGRAM_ID)/flags
@touch $(CURDIR)/SdOut/atmosphere/contents/$(PROGRAM_ID)/flags/boot2.flag
@cp $(CURDIR)/emuiibo/target/$(TARGET_TRIPLE)/debug/emuiibo.nsp $(CURDIR)/SdOut/atmosphere/contents/$(PROGRAM_ID)/exefs.nsp
@cp $(CURDIR)/emuiibo/toolbox.json $(CURDIR)/SdOut/atmosphere/contents/$(PROGRAM_ID)/toolbox.json
@mkdir -p $(CURDIR)/SdOut/switch/.overlays
@cp $(CURDIR)/overlay/emuiibo.ovl $(CURDIR)/SdOut/switch/.overlays/emuiibo.ovl
@mkdir -p $(CURDIR)/SdOut/emuiibo/overlay
@cp -r $(CURDIR)/overlay/lang $(CURDIR)/SdOut/emuiibo/overlay/
@echo "Output (dev) created at $(CURDIR)/SdOut"
emuiigen:
@cd emuiigen && mvn package
emuiibo-clean:
@rm -rf $(CURDIR)/SdOut
@cd emuiibo && cargo clean
@$(MAKE) clean -C overlay/
emuiigen-clean:
@cd emuiigen && mvn clean