-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile
105 lines (80 loc) · 3.77 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# --------------------------------------------------------------------------------
# Friday Night Funkin' Rewritten Makefile v1.3
#
# Copyright (C) 2021 HTV04
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------------
all: lovefile desktop console
desktop: lovefile win64 win32 macos
console: lovefile switch
lovefile:
@rm -rf build/lovefile
@mkdir -p build/lovefile
@cd src/love; zip -r -9 ../../build/lovefile/funkin-rewritten.love .
@mkdir -p build/release
@rm -f build/release/funkin-rewritten-lovefile.zip
@cd build/lovefile; zip -9 -r ../release/funkin-rewritten-lovefile.zip .
win64: lovefile
@rm -rf build/win64
@mkdir -p build/win64
@cp resources/win64/love/OpenAL32.dll build/win64
@cp resources/win64/love/SDL2.dll build/win64
@cp resources/win64/love/license.txt build/win64
@cp resources/win64/love/lua51.dll build/win64
@cp resources/win64/love/mpg123.dll build/win64
@cp resources/win64/love/love.dll build/win64
@cp resources/win64/love/msvcp120.dll build/win64
@cp resources/win64/love/msvcr120.dll build/win64
@cat resources/win64/love/love.exe build/lovefile/funkin-rewritten.love > build/win64/funkin-rewritten.exe
@mkdir -p build/release
@rm -f build/release/funkin-rewritten-win64.zip
@cd build/win64; zip -9 -r ../release/funkin-rewritten-win64.zip .
win32: lovefile
@rm -rf build/win32
@mkdir -p build/win32
@cp resources/win32/love/OpenAL32.dll build/win32
@cp resources/win32/love/SDL2.dll build/win32
@cp resources/win32/love/license.txt build/win32
@cp resources/win32/love/lua51.dll build/win32
@cp resources/win32/love/mpg123.dll build/win32
@cp resources/win32/love/love.dll build/win32
@cp resources/win32/love/msvcp120.dll build/win32
@cp resources/win32/love/msvcr120.dll build/win32
@cat resources/win32/love/love.exe build/lovefile/funkin-rewritten.love > build/win32/funkin-rewritten.exe
@mkdir -p build/release
@rm -f build/release/funkin-rewritten-win32.zip
@cd build/win32; zip -9 -r ../release/funkin-rewritten-win32.zip .
macos: lovefile
@rm -rf build/macos
@mkdir -p "build/macos/Friday Night Funkin' Rewritten.app"
@cp -r resources/macos/love.app/. "build/macos/Friday Night Funkin' Rewritten.app"
@cp build/lovefile/funkin-rewritten.love "build/macos/Friday Night Funkin' Rewritten.app/Contents/Resources"
@mkdir -p build/release
@rm -f build/release/funkin-rewritten-macos.zip
@cd build/macos; zip -9 -r ../release/funkin-rewritten-macos.zip .
switch: lovefile
@rm -rf build/switch
@mkdir -p build/switch/switch/funkin-rewritten
@nacptool --create "Friday Night Funkin' Rewritten" HTV04 "$(shell cat version.txt)" build/switch/funkin-rewritten.nacp
@mkdir build/switch/romfs
@cp build/lovefile/funkin-rewritten.love build/switch/romfs/game.love
@elf2nro resources/switch/love.elf build/switch/switch/funkin-rewritten/funkin-rewritten.nro --icon=resources/switch/icon.jpg --nacp=build/switch/funkin-rewritten.nacp --romfsdir=build/switch/romfs
@rm -r build/switch/romfs
@rm build/switch/funkin-rewritten.nacp
@mkdir -p build/release
@rm -f build/release/funkin-rewritten-switch.zip
@cd build/switch; zip -9 -r ../release/funkin-rewritten-switch.zip .
clean:
@rm -rf build