-
Notifications
You must be signed in to change notification settings - Fork 172
/
Copy pathMakefile
384 lines (348 loc) · 10.2 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
TEAMTALK_ROOT?=$(PWD)/..
CONFIGTYPE?=release
CMAKE_GENERATOR?=Ninja
SHELL := /bin/bash
help:
@echo "To make debug configuration specify CONFIGTYPE=debug:"
@echo " make CONFIGTYPE=debug android-armeabi-v7a"
teamtalk-env:
@echo "Testing that TEAMTALK_ROOT is valid."
@echo "Source env.sh in repository root to set up environment"
test -d "$(TEAMTALK_ROOT)"
genlib:
mkdir -p $(BUILDDIR)
cd $(BUILDDIR) && cmake $(CMAKE_EXTRA) -DCMAKE_BUILD_TYPE=$(CONFIGTYPE) -G "$(CMAKE_GENERATOR)" ../../
buildlib: genlib
cmake --build $(BUILDDIR) $(CMAKE_BUILD_EXTRA)
android-build:
@echo "Testing if ANDROID_NDK_HOME environment variable is set: $(ANDROID_NDK_HOME)"
test -n "$(ANDROID_NDK_HOME)"
$(MAKE) CONFIGTYPE=$(CONFIGTYPE) \
CMAKE_EXTRA+="-DCMAKE_TOOLCHAIN_FILE=$(ANDROID_NDK_HOME)/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=$(ANDROID_ABI) \
-DANDROID_PLATFORM=android-21 \
-DBUILD_TEAMTALK_LIBRARY_LIB=ON \
-DBUILD_TEAMTALK_LIBRARY_LIBPRO=ON \
-DBUILD_TEAMTALK_LIBRARIES=ON \
-DBUILD_TEAMTALK_CLIENTS=OFF \
-DBUILD_TEAMTALK_SERVERS=OFF \
-DBUILD_TEAMTALK_SERVER_SRVEXE=OFF \
-DBUILD_TEAMTALK_SERVER_SRVEXEPRO=OFF \
-DTOOLCHAIN_ZLIB=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON" \
buildlib
android-armeabi-v7a: teamtalk-env
$(MAKE) ANDROID_ABI=armeabi-v7a BUILDDIR=build-$@ android-build
android-arm64-v8a: teamtalk-env
$(MAKE) ANDROID_ABI=arm64-v8a BUILDDIR=build-$@ android-build
android-x86: teamtalk-env
$(MAKE) ANDROID_ABI=x86 BUILDDIR=build-$@ android-build
android-x64: teamtalk-env
$(MAKE) ANDROID_ABI=x86_64 BUILDDIR=build-$@ android-build
android-all: android-armeabi-v7a android-arm64-v8a android-x86 android-x64
generic:
$(MAKE) buildlib
ubuntu:
@echo May need to specify JAVA_HOME to help CMake find Java SDK
$(MAKE) BUILDDIR=build-$(UBUNTUDIR) \
CMAKE_EXTRA+="-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DTOOLCHAIN_OPENSSL=OFF" generic
ubuntu18:
$(MAKE) CMAKE_EXTRA+="-DBUILD_TEAMTALK_LIBRARY_DLL=OFF \
-DBUILD_TEAMTALK_LIBRARY_DLLPRO=OFF \
-DBUILD_TEAMTALK_LIBRARIES=OFF \
-DBUILD_TEAMTALK_SERVERS=OFF \
-DBUILD_TEAMTALK_CLIENTS=OFF \
-DTOOLCHAIN_OPENSSL=OFF \
-DTOOLCHAIN_ZLIB=OFF \
-DTOOLCHAIN_CATCH2=OFF \
-DTOOLCHAIN_LIBVPX=OFF \
-DTOOLCHAIN_FFMPEG=OFF \
-DTOOLCHAIN_OGG=OFF \
-DTOOLCHAIN_OPUS=OFF \
-DTOOLCHAIN_PORTAUDIO=OFF \
-DTOOLCHAIN_SPEEX=OFF \
-DTOOLCHAIN_SPEEXDSP=OFF \
-DFEATURE_OPUSTOOLS=OFF \
-DFEATURE_WEBRTC=OFF \
-DBUILD_TEAMTALK_DOCUMENTATION=OFF" UBUNTUDIR=$@ ubuntu
ubuntu19:
$(MAKE) UBUNTUDIR=$@ ubuntu
ubuntu20:
$(MAKE) UBUNTUDIR=$@ ubuntu
ubuntu22:
$(MAKE) UBUNTUDIR=$@ ubuntu
ubuntu24:
$(MAKE) UBUNTUDIR=$@ ubuntu
rasp:
$(MAKE) CMAKE_EXTRA+="-DFEATURE_WEBRTC=OFF \
-DTOOLCHAIN_OPENSSL=OFF" \
BUILDDIR=build-$@ generic
mac:
$(MAKE) BUILDDIR=build-$@ CMAKE_EXTRA+="-DCMAKE_OSX_ARCHITECTURES=\"arm64;x86_64\"" generic
ios-build:
$(MAKE) CMAKE_EXTRA+="-DCMAKE_SYSTEM_NAME=iOS \
-DBUILD_TEAMTALK_LIBRARY_LIB=ON \
-DBUILD_TEAMTALK_LIBRARY_LIBPRO=ON \
-DBUILD_TEAMTALK_LIBRARY_DLL=OFF \
-DBUILD_TEAMTALK_LIBRARY_DLLPRO=OFF \
-DFEATURE_OGG=OFF \
-DFEATURE_FFMPEG=OFF \
-DFEATURE_OPUSTOOLS=OFF \
-DBUILD_TEAMTALK_LIBRARIES=OFF \
-DBUILD_TEAMTALK_CLIENTS=OFF \
-DBUILD_TEAMTALK_SERVERS=OFF \
-DBUILD_TEAMTALK_SERVER_SRVEXE=OFF \
-DBUILD_TEAMTALK_SERVER_SRVEXEPRO=OFF \
-DTOOLCHAIN_ZLIB=OFF" \
buildlib
IOS_INSTALL_DIR?=$(PWD)/ios-install
ios-arm64:
$(MAKE) CMAKE_EXTRA+="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_SYSROOT=iphoneos -DTOOLCHAIN_INSTALL_PREFIX=$(INSTALLDIR)/arm64" BUILDDIR=build-$@ ios-build
$(MAKE) ARCH=arm64 lipo-arch
ios-x64:
$(MAKE) CMAKE_EXTRA+="-DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_SYSROOT=iphonesimulator -DTOOLCHAIN_INSTALL_PREFIX=$(INSTALLDIR)/x86_64" BUILDDIR=build-$@ ios-build
$(MAKE) ARCH=x86_64 lipo-arch
ios-all: ios-arm64 ios-x64 lipo
lipo-arch: teamtalk-env
test -d "$(INSTALLDIR)"
libtool -static -o $(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5-$(ARCH).a \
$(INSTALLDIR)/$(ARCH)/speex/lib/libspeex.a \
$(INSTALLDIR)/$(ARCH)/speexdsp/lib/libspeexdsp.a \
$(INSTALLDIR)/$(ARCH)/opus/lib/libopus.a \
$(INSTALLDIR)/$(ARCH)/libvpx/lib/libvpx.a \
$(INSTALLDIR)/$(ARCH)/ace/lib/libACE.a \
$(INSTALLDIR)/$(ARCH)/ace/lib/libACE_SSL.a \
$(INSTALLDIR)/$(ARCH)/ace/lib/libACE_INet.a \
$(INSTALLDIR)/$(ARCH)/ace/lib/libACE_INet_SSL.a \
$(INSTALLDIR)/$(ARCH)/openssl/lib/libcrypto.a \
$(INSTALLDIR)/$(ARCH)/openssl/lib/libssl.a \
$(INSTALLDIR)/$(ARCH)/webrtc/obj/modules/audio_processing/libteamtalk.a \
$(TEAMTALK_ROOT)/Library/TeamTalk_DLL/$(ARCH)/libTeamTalk5.a
libtool -static -o $(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5Pro-$(ARCH).a \
$(INSTALLDIR)/$(ARCH)/speex/lib/libspeex.a \
$(INSTALLDIR)/$(ARCH)/speexdsp/lib/libspeexdsp.a \
$(INSTALLDIR)/$(ARCH)/opus/lib/libopus.a \
$(INSTALLDIR)/$(ARCH)/libvpx/lib/libvpx.a \
$(INSTALLDIR)/$(ARCH)/ace/lib/libACE.a \
$(INSTALLDIR)/$(ARCH)/ace/lib/libACE_SSL.a \
$(INSTALLDIR)/$(ARCH)/ace/lib/libACE_INet.a \
$(INSTALLDIR)/$(ARCH)/ace/lib/libACE_INet_SSL.a \
$(INSTALLDIR)/$(ARCH)/openssl/lib/libcrypto.a \
$(INSTALLDIR)/$(ARCH)/openssl/lib/libssl.a \
$(INSTALLDIR)/$(ARCH)/webrtc/obj/modules/audio_processing/libteamtalk.a \
$(TEAMTALK_ROOT)/Library/TeamTalk_DLL/$(ARCH)/libTeamTalk5Pro.a
lipo: teamtalk-env
lipo $(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5-x86_64.a \
$(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5-arm64.a \
-create -output $(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5.a
lipo $(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5Pro-x86_64.a \
$(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5Pro-arm64.a \
-create -output $(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5Pro.a
xcodeswap-apps:
@echo "Changing to /Applications/Xcode.app/Contents/Developer"
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
teamtalk-jar:
$(MAKE) BUILDDIR=build-$@ CMAKE_EXTRA+="-DBUILD_TEAMTALK_CLIENTS=OFF \
-DBUILD_TEAMTALK_SERVERS=OFF \
-DBUILD_TEAMTALK_LIBRARY_JNI=OFF \
-DBUILD_TEAMTALK_LIBRARY_JNIPRO=OFF \
-DBUILD_TEAMTALK_LIBRARY_DLL_DOTNET=OFF \
-DBUILD_TEAMTALK_LIBRARY_DLLPRO_DOTNET=OFF \
-DBUILD_TEAMTALK_LIBRARY_DLL_DOTNET=OFF \
-DBUILD_TEAMTALK_LIBRARY_DLLPRO_DOTNET=OFF" \
buildlib
# TeamTalk 5 dependencies for Ubuntu 18
depend-ubuntu18:
# Duplicate install in Docker/Dockerfile_ubuntu18
apt install \
autoconf \
cmake \
doxygen \
g++ \
junit4 \
libasound2-dev \
libpcap-dev \
libpulse-dev \
libqt5texttospeech5-dev \
libqt5x11extras5-dev \
libssl-dev \
libtool \
libxss-dev
ninja-build \
openjdk-11-jdk \
pkg-config \
python \
python3-pytest \
qt5-default \
qtmultimedia5-dev \
qttools5-dev \
qttools5-dev-tools \
yasm
depend-ubuntu20:
# Duplicate install in Docker/Dockerfile_ubuntu20
apt install \
autoconf \
cmake \
doxygen \
g++ \
junit4 \
libasound2-dev \
libpcap-dev \
libpulse-dev \
libqt5texttospeech5-dev \
libqt5x11extras5-dev \
libssl-dev \
libtool \
libxss-dev \
ninja-build \
openjdk-17-jdk \
pkg-config \
python \
qt5-default \
qtmultimedia5-dev \
qttools5-dev \
qttools5-dev-tools \
yasm
depend-ubuntu22:
# Duplicate install in Docker/Dockerfile_ubuntu22
apt install \
autoconf \
cmake \
doxygen \
g++ \
junit4 \
libasound2-dev \
libpcap-dev \
libpulse-dev \
libqt5texttospeech5-dev \
libqt5x11extras5-dev \
libssl-dev \
libtool \
libxss-dev \
ninja-build \
openjdk-18-jdk \
p7zip-full \
pkg-config \
python2 \
python3-pytest \
qtbase5-dev \
qtmultimedia5-dev \
qttools5-dev \
qttools5-dev-tools \
yasm
@echo "Ensure a default python is set up for WebRTC to compile:"
@echo "# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10"
depend-ubuntu24:
# Duplicate install in Docker/Dockerfile_ubuntu24
apt install \
autoconf \
cmake \
doxygen \
g++ \
git \
junit4 \
libasound2-dev \
libpcap-dev \
libpulse-dev \
libssl-dev \
libtool \
libxss-dev \
ninja-build \
openjdk-21-jdk \
p7zip-full \
pkg-config \
python3-pytest \
qt6-base-dev \
qt6-declarative-dev \
qt6-multimedia-dev \
qt6-speech-dev \
qt6-tools-dev \
qt6-tools-dev-tools \
yasm
@echo "Ensure a default python is set up for WebRTC to compile:"
@echo "# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 12"
depend-ubuntu18-android:
apt install \
autoconf \
cmake \
doxygen \
junit4 \
libtool \
ninja-build \
openjdk-11-jdk \
pkg-config \
python
depend-ubuntu22-android:
apt install \
autoconf \
cmake \
doxygen \
junit4 \
libtool \
ninja-build \
openjdk-18-jdk \
pkg-config \
python2 \
python3-pytest
depend-debian12:
apt install \
autoconf \
cmake \
doxygen \
g++ \
git \
junit4 \
libasound2-dev \
libpcap-dev \
libpulse-dev \
libssl-dev \
libtool \
libxss-dev \
ninja-build \
openjdk-17-jdk \
p7zip-full \
pkg-config \
python3-pytest \
qt6-base-dev \
qt6-declarative-dev \
qt6-multimedia-dev \
qt6-speech-dev \
qt6-tools-dev \
qt6-tools-dev-tools \
yasm
depend-raspios12:
apt install \
autoconf \
cmake \
doxygen \
g++ \
git \
junit4 \
libasound2-dev \
libpcap-dev \
libpulse-dev \
libssl-dev \
libtool \
libxss-dev \
ninja-build \
openjdk-17-jdk \
p7zip-full \
pkg-config \
python3-pytest \
qt6-base-dev \
qt6-declarative-dev \
qt6-multimedia-dev \
qt6-speech-dev \
qt6-tools-dev \
qt6-tools-dev-tools \
yasm
depend-mac:
brew install \
autoconf \
automake \
libtool \
ninja \
pkg-config \
python-setuptools \
yasm