33
44.PHONY : all clean starlight send
55
6+
7+ GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
8+ GIT_COMMIT := $(shell git rev-parse --short HEAD)
9+ GIT_REV := ${GIT_BRANCH}-${GIT_COMMIT}
10+ ifneq (,$(strip $(shell git status --porcelain 2>/dev/null) ) )
11+ GIT_REV := $(GIT_REV ) -dirty
12+ endif
13+
614SMOVER ?= 100
7- BUILDVER ?= 101
8- BUILDVERSTR ?= 1.3 .0
9- IP ?= 192.168 .0.9 # ftp server ip (usually is switch's local IP)
10- DEBUGLOG ?= 1 # defaults to disable debug logger
11- SERVERIP ?= 192.168.178.37 # put debug logger server IP here
15+ BUILDVER ?= 101
16+ BUILDVERSTR ?= 1.4 .0
17+ IP ?= 10.0 .0.221 # ftp server ip (usually is switch's local IP)
18+ DEBUGLOG ?= 0 # defaults to disable debug logger
19+ SERVERIP ?= 0.0.0.0 # put debug logger server IP here
1220ISEMU ?= 0 # set to 1 to compile for emulators
1321
1422PROJNAME ?= StarlightBase
@@ -33,26 +41,39 @@ starlight_patch_$(SMOVER)/*.ips: patches/*.slpatch patches/configs/$(SMOVER).con
3341 @rm -f starlight_patch_$(SMOVER ) /* .ips
3442 python3 scripts/genPatch.py $(SMOVER )
3543
36- # builds project with the file structure and flags used for emulators
44+ # builds project with the file structure for SMOO-Emulator
3745emu :
3846 $(MAKE ) all -f MakefileNSO SMOVER=$(SMOVER ) BUILDVERSTR=$(BUILDVERSTR ) BUILDVER=$(BUILDVER ) EMU=1
3947 $(MAKE ) starlight_patch_$(SMOVER ) /* .ips
4048
41- mkdir -p starlight_patch_$(SMOVER)/yuzu/
49+ @echo "Creating SMOO-Emulator folder structure inside starlight_patch_$(SMOVER)..."
50+ mkdir -p starlight_patch_$(SMOVER)/SMOO-Emulator/exefs/
51+ mkdir -p starlight_patch_$(SMOVER)/SMOO-Emulator/romfs/
52+
53+ # Move .ips file to exefs folder
54+ mv starlight_patch_$(SMOVER)/3CA12DFAAF9C82DA064D1698DF79CDA1.ips starlight_patch_$(SMOVER)/SMOO-Emulator/exefs/3CA12DFAAF9C82DA064D1698DF79CDA1.ips
55+
56+ # Move subsdk9 (nso file) to exefs folder
57+ mv $(shell basename $(CURDIR))$(SMOVER).nso starlight_patch_$(SMOVER)/SMOO-Emulator/exefs/subsdk9
58+
59+ # Copy romfs folder contents
60+ cp -R romfs/* starlight_patch_$(SMOVER)/SMOO-Emulator/romfs/ 2>/dev/null || true
61+
62+ # Clean up temporary files
63+ rm -f $(shell basename $(CURDIR))$(SMOVER).elf
64+
65+ @echo "SMOO-Emulator folder created successfully inside starlight_patch_$(SMOVER)!"
4266
43- mv starlight_patch_$(SMOVER)/3CA12DFAAF9C82DA064D1698DF79CDA1.ips starlight_patch_$(SMOVER)/yuzu/3CA12DFAAF9C82DA064D1698DF79CDA1.ips
44- mv $(shell basename $(CURDIR))$(SMOVER).elf starlight_patch_$(SMOVER)/subsdk1.elf
45- mv $(shell basename $(CURDIR))$(SMOVER).nso starlight_patch_$(SMOVER)/yuzu/subsdk1
4667# builds and sends project to FTP server hosted on provided IP
4768send : all
48- python3.8 scripts/sendPatch.py $(IP ) $(PROJNAME )
69+ python3 scripts/sendPatch.py $(IP ) $(PROJNAME )
4970
5071log : all
51- python3.8 scripts/tcpServer.py $(SERVERIP )
72+ python3 scripts/tcpServer.py $(SERVERIP )
5273
5374sendlog : all
54- python3.8 scripts/sendPatch.py $(IP ) $(PROJNAME ) $(USER ) $(PASS )
55- python3.8 scripts/tcpServer.py $(SERVERIP )
75+ python3 scripts/sendPatch.py $(IP ) $(PROJNAME ) $(USER ) $(PASS )
76+ python3 scripts/tcpServer.py $(SERVERIP )
5677
5778clean :
5879 $(MAKE ) clean -f MakefileNSO
0 commit comments