forked from signalapp/ringrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (51 loc) · 1.48 KB
/
Makefile
File metadata and controls
67 lines (51 loc) · 1.48 KB
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
V ?= 0
Q = @
ifneq ($V,0)
Q =
endif
JOBS ?= 8
BUILD_TYPES := release debug
GN_ARCHS := arm arm64 x86 x64
ANDROID_TARGETS := $(foreach t, $(BUILD_TYPES), \
$(foreach a, $(GN_ARCHS), \
android/$(a)/$(t)))
IOS_TARGETS := ios/release
help:
$(Q) echo "The following build targets are supported:"
$(Q) echo " ios -- download WebRTC and build iOS platform products."
$(Q) echo " android -- download WebRTC and build Android platform products."
$(Q) echo
$(Q) echo "The following clean targets are supported:"
$(Q) echo " clean -- remove all platform build products."
$(Q) echo " distclean -- remove everything, including downloaded WebRTC dependencies."
$(Q) echo
android: $(ANDROID_TARGETS)
$(Q) ./bin/build-aar -j$(JOBS)
out/android.env:
$(Q) echo "Preparing Android workspace"
$(Q) ./bin/prepare-workspace android
android/%: ARCH = $(word 1, $(subst /, , $*))
android/%: TYPE = $(word 2, $(subst /, , $*))
android/%: out/android.env
$(Q) ./bin/build-aar --compile-only --$(TYPE)-build --arch $(ARCH) -j$(JOBS)
ios: $(IOS_TARGETS)
out/ios.env:
$(Q) echo "Preparing iOS workspace"
$(Q) ./bin/prepare-workspace ios
ios/%: TYPE = $*
ios/%: out/ios.env
$(Q) if [ "$(TYPE)" = "debug" ] ; then \
echo "iOS: Debug build" ; \
./bin/build-ios -d ; \
else \
echo "iOS: Release build" ; \
./bin/build-ios ; \
fi
PHONY += clean
clean:
$(Q) ./bin/build-aar --clean
$(Q) ./bin/build-ios --clean
PHONY += distclean
distclean:
$(Q) rm -rf ./out
.PHONY: $(PHONY)