-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·103 lines (85 loc) · 2.46 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
#
# brtclite Makefile
#
#
#
TARGET = brtclite
SOTARGET = libbaidurtc_lite
SOSUFFIX = so
CPU_ARCH = $(shell uname -m)
$(info Host CPU ARCH: $(CPU_ARCH))
ifeq ($(BRTC_BUILD_ARCH), armv7-softfp)
BRTC_BUILD_ARM_EABI_SOFTFP = yes
else ifeq ($(BRTC_BUILD_ARCH), armv7)
BRTC_BUILD_ARM = yes
else ifeq ($(BRTC_BUILD_ARCH), arm64)
BRTC_BUILD_ARM64 = yes
else ifeq ($(BRTC_BUILD_ARCH), armv7-softfp-uclibc)
BRTC_BUILD_ARM_EABI_SOFTFP_UCLIBC = yes
else ifeq ($(BRTC_BUILD_ARCH), armv7-soft-uclibc)
BRTC_BUILD_ARM_EABI_SOFT_UCLIBC = yes
else ifeq ($(BRTC_BUILD_ARCH), qnx-arm64)
BRTC_BUILD_QNX_ARM64 = yes
else ifeq ($(BRTC_BUILD_ARCH), qnx-armv7)
BRTC_BUILD_QNX_ARM = yes
else ifeq ($(BRTC_BUILD_ARCH), qnx-x86)
BRTC_BUILD_QNX_X86 = yes
else ifeq ($(BRTC_BUILD_ARCH), qnx-x86_64)
BRTC_BUILD_QNX_X86_64 = yes
endif
GCC_PREFIX =
ARM_EABI_SOFTFP =
ifeq ($(BRTC_BUILD_ARM_EABI_SOFTFP), yes)
CPU_ARCH = armv7l
ARM_EABI_SOFTFP = -softfp
GCC_PREFIX = arm-linux-gnueabi-
endif
ifeq ($(BRTC_BUILD_ARM), yes)
CPU_ARCH = armv7l
GCC_PREFIX = arm-linux-gnueabihf-
endif
ifeq ($(BRTC_BUILD_ARM64), yes)
CPU_ARCH = aarch64
GCC_PREFIX = aarch64-linux-gnu-
endif
ifeq ($(BRTC_BUILD_ARM_EABI_SOFTFP_UCLIBC), yes)
CPU_ARCH = armv7l
ARM_EABI_SOFTFP = -softfp-uclibc
GCC_PREFIX = arm-hisiv500-linux-uclibcgnueabi-
endif
ifeq ($(BRTC_BUILD_ARM_EABI_SOFT_UCLIBC), yes)
CPU_ARCH = armv7l
ARM_EABI_SOFTFP = -soft-uclibc
GCC_PREFIX = arm-hisiv500-linux-uclibcgnueabi-
endif
ifeq ($(BRTC_BUILD_QNX_ARM64), yes)
CPU_TYPE = arm64
GCC_PREFIX = aarch64-unknown-nto-qnx7.0.0-
CPU_ARCH = qnx-cpu-arch
else ifeq ($(BRTC_BUILD_QNX_ARM), yes)
CPU_TYPE = armv7
GCC_PREFIX = arm-unknown-nto-qnx7.0.0eabi-
CPU_ARCH = qnx-cpu-arch
else ifeq ($(BRTC_BUILD_QNX_X86), yes)
CPU_TYPE = x86
GCC_PREFIX = i586-pc-nto-qnx7.0.0-
CPU_ARCH = qnx-cpu-arch
else ifeq ($(BRTC_BUILD_QNX_X86_64), yes)
CPU_TYPE = x86_64
GCC_PREFIX = x86_64-pc-nto-qnx7.0.0-
CPU_ARCH = qnx-cpu-arch
endif
$(info Set target CPU ARCH to: $(CPU_ARCH) $(CPU_TYPE))
brtclite:
$(MAKE) -C re install ARCH=$(CPU_ARCH)
$(MAKE) -C rem install ARCH=$(CPU_ARCH)
$(MAKE) -C baresip install install-dev ARCH=$(CPU_ARCH)
$(MAKE) -C barertc install ARCH=$(CPU_ARCH)
clean:
$(MAKE) -C re clean ARCH=$(CPU_ARCH)
$(MAKE) -C rem clean ARCH=$(CPU_ARCH)
$(MAKE) -C baresip clean ARCH=$(CPU_ARCH)
$(MAKE) -C barertc clean ARCH=$(CPU_ARCH)
default: brtclite
all: default
rebuild: clean default