forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
162 lines (115 loc) · 9.98 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
############## MAC ##################
bin/godot.osx.opt.x86_64:
scons production=yes arch=x86_64 platform=osx target=release tools=no -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam,../eosg
install_name_tool -change @rpath/libEOSSDK-Mac-Shipping.dylib @loader_path/libEOSSDK-Mac-Shipping.dylib bin/godot.osx.opt.x86_64
# bin/godot.osx.opt.arm64:
# scons production=yes arch=arm64 platform=osx target=release tools=no -j6 custom_modules=../sg-physics-2d/godot/modules/ custom_modules=../godotsteam
bin/godot.osx.opt.tools.x86_64:
scons production=yes arch=x86_64 platform=osx target=release_debug tools=yes -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam,../eosg
install_name_tool -change @rpath/libEOSSDK-Mac-Shipping.dylib @loader_path/libEOSSDK-Mac-Shipping.dylib bin/godot.osx.opt.tools.x86_64
# bin/godot.osx.opt.tools.arm64:
# scons production=yes arch=arm64 platform=osx target=release_debug tools=yes -j6 custom_modules=../sg-physics-2d/godot/modules/ custom_modules=../godotsteam
# bin/godot.osx.opt.tools.universal: bin/godot.osx.opt.tools.x86_64 bin/godot.osx.opt.tools.arm64
# lipo -create bin/godot.osx.opt.tools.x86_64 bin/godot.osx.opt.tools.arm64 -output bin/godot.osx.opt.tools.universal
# bin/godot.osx.opt.universal: bin/godot.osx.opt.x86_64 bin/godot.osx.opt.arm64
# lipo -create bin/godot.osx.opt.x86_64 bin/godot.osx.opt.arm64 -output bin/godot.osx.opt.universal
mac_editor: bin/godot.osx.opt.tools.x86_64
cp -r misc/dist/osx_tools.app ./Godot.app
mkdir -p Godot.app/Contents/MacOS
cp bin/godot.osx.opt.tools.x86_64 Godot.app/Contents/MacOS/Godot
cp ../godotsteam/sdk/redistributable_bin/osx/libsteam_api.dylib Godot.app/Contents/MacOS/
cp ../eosg/thirdparty/eos-sdk/Bin/libEOSSDK-Mac-Shipping.dylib Godot.app/Contents/MacOS/
chmod +x Godot.app/Contents/MacOS/Godot
mac_export: bin/godot.osx.opt.x86_64
cp -r misc/dist/osx_template.app .
mkdir -p osx_template.app/Contents/MacOS
cp bin/godot.osx.opt.x86_64 osx_template.app/Contents/MacOS/godot_osx_release.64
cp ../godotsteam/sdk/redistributable_bin/osx/libsteam_api.dylib osx_template.app/Contents/MacOS/
cp ../eosg/thirdparty/eos-sdk/Bin/libEOSSDK-Mac-Shipping.dylib osx_template.app/Contents/MacOS/
#cp bin/godot.osx.opt.debug.universal osx_template.app/Contents/MacOS/godot_osx_debug.64
chmod +x osx_template.app/Contents/MacOS/godot_osx*
zip -q -9 -r osx.zip osx_template.app
mac_clean:
rm bin/godot.osx.opt.x86_64 bin/godot.osx.opt.arm64 bin/godot.osx.opt.tools.x86_64 bin/godot.osx.opt.tools.arm64 bin/godot.osx.opt.tools.universal bin/godot.osx.opt.universal
mac_clean_hard:
scons production=yes arch=x86_64 platform=osx target=release tools=no -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
scons production=yes arch=x86_64 platform=osx target=release_debug tools=yes -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
# scons production=yes arch=arm64 platform=osx target=release tools=no -j6 custom_modules=../sg-physics-2d/godot/modules/ custom_modules=../godotsteam -c
# scons production=yes arch=arm64 platform=osx target=release_debug tools=yes -j6 custom_modules=../sg-physics-2d/godot/modules/ custom_modules=../godotsteam -c
mac: mac_editor mac_export
############ WINDOWS #################
bin/godot.windows.opt.64.exe:
scons production=yes platform=windows target=release tools=no -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam,../eosg use_lto=yes
bin/godot.windows.opt.tools.64.exe:
scons production=yes platform=windows target=release_debug tools=yes -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam,../eosg use_lto=yes
windows: bin/godot.windows.opt.64.exe bin/godot.windows.opt.tools.64.exe
windows_editor: bin/godot.windows.opt.tools.64.exe
mkdir -p bin/windows_editor
cp bin/godot.windows.opt.tools.64.exe bin/windows_editor/Godot.exe
cp ../godotsteam/sdk/redistributable_bin/win64/steam_api64.dll bin/windows_editor/
cp ../eosg/thirdparty/eos-sdk/Bin/EOSSDK-Win64-Shipping.dll bin/windows_editor/
cd bin && zip -q -9 -r windows_editor.zip windows_editor
windows_editor_clean:
rm bin/godot.windows.opt.tools.64.exe
windows_clean_hard:
scons production=yes platform=windows target=release tools=no -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam use_lto=yes -c
scons production=yes platform=windows target=release_debug tools=yes -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam use_lto=yes -c
windows_clean:
rm bin/godot.windows.opt.64.exe bin/godot.windows.opt.tools.64.exe
############### ANDROID ################
android:
scons production=yes platform=android target=release tools=no android_arch=armv7 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
scons production=yes platform=android target=release tools=no android_arch=arm64v8 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
scons production=yes platform=android target=debug tools=no android_arch=armv7 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
scons production=yes platform=android target=debug tools=no android_arch=arm64v8 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
cd platform/android/java && ./gradlew generateGodotTemplates
android_clean:
rm bin/libgodot.android*
android_clean_hard:
scons production=yes platform=android target=release tools=no android_arch=armv7 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
scons production=yes platform=android target=release tools=no android_arch=arm64v8 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
scons production=yes platform=android target=debug tools=no android_arch=armv7 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
scons production=yes platform=android target=debug tools=no android_arch=arm64v8 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
############## IOS #################
ios:
#scons production=yes p=iphone tools=no target=release arch=arm -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
scons production=yes p=iphone tools=no target=release arch=arm64 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
#scons p=iphone tools=no ios_simulator=yes target=release arch=x86_64 -j6 custom_modules=../sg-physics-2d/godot/modules/
#lipo -create bin/libgodot.iphone.opt.arm.a bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.opt.x86_64.simulator.a -output bin/libgodot.iphone.release.fat.a
#lipo -create bin/libgodot.iphone.opt.arm.a bin/libgodot.iphone.opt.arm64.a -output bin/libgodot.iphone.release.fat.a
chmod +x bin/libgodot.iphone.opt.arm64.a
cp -R misc/dist/ios_xcode .
mv ios_xcode iphone
cp bin/libgodot.iphone.opt.arm64.a iphone/libgodot.iphone.release.xcframework/ios-arm64/libgodot.a
zip -q -9 -r iphone.zip iphone
ios_clean:
rm bin/libgodot.iphone.opt.arm.a bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.release.fat.a
rm -rf iphone/
rm iphone.zip
ios_clean_hard:
scons production=yes p=iphone tools=no target=release arch=arm -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
scons production=yes p=iphone tools=no target=release arch=arm64 -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
################ HTML ################
html:
scons production=yes platform=javascript tools=no threads_enabled=yes target=release -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
scons production=yes platform=javascript tools=no threads_enabled=yes target=release_debug -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
scons production=yes platform=javascript tools=no threads_enabled=no target=release -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
scons production=yes platform=javascript tools=no threads_enabled=no target=release_debug -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam
html_clean:
rm bin/godot.javascript*
html_clean_hard:
scons production=yes platform=javascript tools=no threads_enabled=yes target=release -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
scons production=yes platform=javascript tools=no threads_enabled=yes target=release_debug -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
scons production=yes platform=javascript tools=no threads_enabled=no target=release -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
scons production=yes platform=javascript tools=no threads_enabled=no target=release_debug -j6 custom_modules=../sg-physics-2d/godot/modules/,../godotsteam -c
############## LINUX ################
linux:
docker run --rm -it --cpus 6 --memory 6g -v /Users/daviddehaene/Developer/godot:/godot -v /Users/daviddehaene/Developer/sg-physics-2d/godot/modules:/custom_modules -v /Users/daviddehaene/Developer/godotsteam:/godotsteam --platform linux/amd64 ubuntu bash -c "apt -y update; apt -y install clang build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm; cd /godot; scons production=yes platform=x11 use_llvm=yes target=release tools=no -j6 custom_modules=/custom_modules/,/godotsteam"
linux_clean:
rm bin/godot.x11.opt.64.llvm
linux_clean_hard:
docker run --rm -it -v /Users/daviddehaene/Developer/godot:/godot -v /Users/daviddehaene/Developer/sg-physics-2d/godot/modules:/custom_modules -v /Users/daviddehaene/Developer/godotsteam:/godotsteam --platform linux/amd64 ubuntu bash -c "apt -y update; apt -y install clang build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm; cd /godot; scons production=yes platform=x11 use_llvm=yes target=release tools=no -j6 custom_modules=/custom_modules/,/godotsteam -c"
################ ALL #################
clean: mac_clean windows_clean android_clean ios_clean linux_clean html_clean
clean_hard: mac_clean_hard windows_clean_hard android_clean_hard ios_clean_hard linux_clean_hard html_clean_hard
all: mac windows android ios linux html