-
Notifications
You must be signed in to change notification settings - Fork 227
/
Makefile
71 lines (52 loc) · 1.93 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
external_repos := silk opus zrtp4pj openssl libvpx fdk_aac
external_sources := $(foreach repos, $(external_repos),jni/$(repos)/sources)
to_patch := pjsip webrtc ffmpeg libvpx silk fdk_aac
to_patch_files := $(foreach proj, $(to_patch),jni/$(proj)/.patched_sources)
all : libraries
# Dispatch to external projects
@(./dispatch_shared_libs.sh)
# Build native library SUCCESSFUL
libraries : ext-sources webrtc-preprocess libvpx-preprocess
# Build main libraries using android ndk
@(ndk-build -j$(shell nproc))
ffmpeg-lib : jni/ffmpeg/.patched_sources
# Build ffmpeg using make
@($(MAKE) $(MFLAGS) -C jni/ffmpeg)
webrtc-preprocess :
@($(MAKE) $(MFLAGS) -C jni/webrtc preprocess)
libvpx-preprocess :
@($(MAKE) $(MFLAGS) -C jni/libvpx preprocess)
ext-sources : $(external_sources) $(to_patch_files)
# External sources fetched out from external repos/zip
jni/%/sources :
@($(MAKE) $(MFLAGS) -C $(subst /sources,,$@) init)
## Patches against remote projects
jni/%/.patched_sources :
@($(MAKE) $(MFLAGS) -C $(subst /.patched_sources,,$@) patch)
clean :
# NDK clean
@(ndk-build clean)
# Remote clean
@($(MAKE) -C jni/ffmpeg clean)
@($(MAKE) -C jni/webrtc clean)
CodecPackLibs :
@(ndk-build -j6 APP_MODULES="pj_g7221_codec pj_codec2_codec pj_g726_codec pj_opus_codec pj_aac_codec")
@(./dispatch_shared_libs.sh)
CodecG729 :
@(ndk-build -j6 APP_MODULES="pj_g729_codec")
@(./dispatch_shared_libs.sh)
VideoLibs : ffmpeg-lib
@(ndk-build -j6 APP_MODULES="pj_video_android pj_vpx")
@(./dispatch_shared_libs.sh)
ScreenSharingLibs :
@(ndk-build -j6 APP_MODULES="pj_screen_capture_android")
@(./dispatch_shared_libs.sh)
update : $(external_sources)
# Quilt removal
@$(foreach dir,$(to_patch),$(MAKE) $(MFLAGS) -C jni/$(dir) unpatch;)
# Svn update
@svn update --accept theirs-conflict
# Remote sources update
@$(foreach dir,$(external_repos),$(MAKE) $(MFLAGS) -C jni/$(dir) update;)
# Update ffmpeg
@($(MAKE) $(MFLAGS) -C jni/ffmpeg update)