PR for tools/scripts (#7)

* script changes for cross-compile and compliance with development guidelines
pull/8/head
Prajwala 2020-10-29 17:55:13 -04:00 committed by GitHub
parent a98e75982f
commit caf1967ee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 143 additions and 168 deletions

View File

@ -37,28 +37,36 @@ if [ "$build_type" == "debug" ]; then
$debug_flag = true;
fi
if [[ "$target_os" == "ubuntu" ]]; then
platform="debian-x64"
elif [[ "$target_os" == "raspberry-pi" ]]; then
platform="debian-arm"
fi
#assuming this script runs from a place a directory where all three -evio, tools,external exist
Workspace_root=`pwd`
cd "$Workspace_root"/EdgeVPNio
#mkdir -p ~/workspace
#cd ~/workspace
#assuming this script runs from a place a directory where all three -evio, tools,external exist
git clone https://github.com/EdgeVPNio/evio.git
if [[ "$target_os" == "ubuntu" ]]; then
git clone -b debian-x64 --single-branch https://github.com/EdgeVPNio/external.git
elif [[ "$target_os" == "raspberry-pi" ]]; then
git clone -b debian-arm --single-branch https://github.com/EdgeVPNio/external.git
fi
#Todo: add git clone cmd for different OS
git clone https://github.com/EdgeVPNio/tools.git
git clone -b "$platform" --single-branch https://github.com/EdgeVPNio/external.git
cd evio/tincan
export PATH=`pwd`/../../tools/bin:$PATH
if [[ "$target_os" == "ubuntu" ]]; then
gn gen out/debian-x64/$build_type "--args='is_debug=$debug_flag target_sysroot_dir=\"\'pwd\'/../../external\" use_debug_fission=false clang_base_path=\"\'pwd\'/../../tools/llvm/bin\""
ninja -C out/debian-x64/$build_type
export PATH="$Workspace_root"/EdgeVPNio/tools/bin:"$PATH"
#ubuntu debug build
if [ "$target_os" == "ubuntu" ] && [ "$debug_flag" = true ]; then
gn gen out/"$platform"/"$build_type" "--args=is_debug=$debug_flag target_sysroot_dir=\"\"$Workspace_root\"/EdgeVPNio/external\" use_debug_fission=false clang_base_path=\"\"$Workspace_root\"/EdgeVPNio/tools/llvm/bin"\"
#ubuntu release build
elif [ "$target_os" == "ubuntu" ] && [ "$debug_flag" = false ]; then
gn gen out/"$platform"/"$build_type" "--args=is_debug=$debug_flag target_sysroot_dir=\"\"$Workspace_root\"/EdgeVPNio/external\" clang_base_path=\"\"$Workspace_root\"/EdgeVPNio/tools/llvm/bin"\"
#raspberry-pi debug build
elif [ "$target_os" == "raspberry-pi" ] && [ "$debug_flag" = true ]; then
gn gen out/"$platform"/"$build_type" "--args='target_cpu=\"arm\" use_lld=true use_debug_fission=false target_sysroot_dir=\"\"$Workspace_root\"/EdgeVPNio/external\" is_debug=$debug_flag clang_base_path=\"\"$Workspace_root\"/EdgeVPNio/tools/llvm/bin\""
else
gn gen out/debian-arm/$build_type "--args='target_cpu=\"arm\" is_debug=$debug_flag use_lld=true target_sysroot_dir=\"\'pwd\'/../../external\" is_debug=$debug_flag clang_base_path=\"\'pwd\'/../../tools/llvm/bin\""
ninja -C out/debian-arm/$build_type
#raspberry-pi release build
gn gen out/"$platform"/"$build_type" "--args='target_cpu=\"arm\" use_lld=true target_sysroot_dir=\"\"$Workspace_root\"/EdgeVPNio/external\" is_debug=$debug_flag clang_base_path=\"\"$Workspace_root\"/EdgeVPNio/tools/llvm/bin\""
fi
ninja -C out/"$platform"/"$build_type"

89
scripts/build_webrtc.sh 100644 → 100755
View File

@ -41,58 +41,63 @@ if [ "$build_type" == "debug" ]; then
$debug_flag = true;
fi
if [[ "$target_os" == "ubuntu" ]]; then
platform="debian-x64"
elif [[ "$target_os" == "raspberry-pi" ]]; then
platform="debian-arm"
fi
mkdir -p ~/workspace/webrtc-checkout && cd ~/workspace/webrtc-checkout
#install Toolchain according to OS
if [ "$target_os" == "ubuntu" ]; then
sudo apt-get update && sudo apt-get -y install git python
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=`pwd`/depot_tools:"$PATH"
else
sudo apt update && sudo apt install -y debootstrap qemu-user-static git python3-dev
sudo git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /opt/depot_tools
echo "export PATH=/opt/depot_tools:\$PATH" | sudo tee /etc/profile.d/depot_tools.sh
sudo git clone https://github.com/raspberrypi/tools.git /opt/rpi_tools
echo "export PATH=/opt/rpi_tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:\$PATH" | sudo tee /etc/profile.d/rpi_tools.sh
sudo chown -R `whoami`:`whoami` /opt/depot_tools /opt/rpi_tools
source /etc/profile
sudo debootstrap --arch armhf --foreign --include=g++,libasound2-dev,libpulse-dev,libudev-dev,libexpat1-dev,libnss3-dev,libgtk2.0-dev jessie rootfs
sudo cp /usr/bin/qemu-arm-static rootfs/usr/bin/
sudo chroot rootfs /debootstrap/debootstrap --second-stage
find rootfs/usr/lib/arm-linux-gnueabihf -lname '/*' -printf '%p %l\n' | while read link target; do sudo ln -snfv "../../..${target}" "${link}"; done
find rootfs/usr/lib/arm-linux-gnueabihf/pkgconfig -printf "%f\n" | while read target; do sudo ln -snfv "../../lib/arm-linux-gnueabihf/pkgconfig/${target}" rootfs/usr/share/pkgconfig/${target}; done
Workspace_root=`pwd`
mkdir -p "$Workspace_root"/webrtc-checkout && cd "$Workspace_root"/webrtc-checkout
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$Workspace_root/webrtc-checkout/depot_tools:"$PATH"
#To update the setup with depot_tools in path
errormsg=$( gclient sync 2>&1)
if [[ "$errormsg" == *"error"* ]]; then
echo $errormsg
exit 1;
fi
#build webrtc
errormsg=$( fetch --nohooks webrtc 2>&1)
if [[ "$errormsg" == *"error"* ]]; then
echo $errormsg
exit 1;
fi
cd src
git checkout branch-heads/4147
errormsg=$( gclient sync 2>&1)
if [[ "$errormsg" == *"error"* ]]; then
echo $errormsg
exit 1;
fi
if [ "$target_os" == "ubuntu" ]; then
sudo apt-get install gtk2.0
else
./build/install-build-deps.sh
./build/linux/sysroot_scripts/install-sysroot.py --arch=arm
echo $errormsg
exit 1;
fi
if [ "$target_os" == "ubuntu" ]; then
gn gen out/$build_type "--args=enable_iterator_debugging=false is_component_build=false is_debug=$debug_flag"
sudo apt-get install gtk2.0
./src/build/install-build-deps.sh --no-chromeos-fonts
else
gn gen out/$build_type "--args='target_os=\"linux\" target_cpu=\"arm\" is_debug=$debug_flag enable_iterator_debugging=false is_component_build=false is_debug=true rtc_build_wolfssl=true rtc_build_ssl=false rtc_ssl_root=\"/usr/local/include\"\'"
./src/build/install-build-deps.sh --no-chromeos-fonts
./src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm
fi
cd src
git checkout branch-heads/4147
#to update the path to depot_tools/gn and ninja
errormsg=$( gclient sync 2>&1)
if [[ "$errormsg" == *"error"* ]]; then
echo $errormsg
exit 1;
fi
#ubuntu debug build
if [ "$target_os" == "ubuntu" ] && [ "$debug_flag" = true ]; then
gn gen out/"$platform"/"$build_type" "--args=enable_iterator_debugging=false is_debug=$debug_flag use_debug_fission=false"
#ubuntu release build
elif [ "$target_os" == "ubuntu" ] && [ "$debug_flag" = false ]; then
gn gen out/"$platform"/"$build_type" "--args=enable_iterator_debugging=false is_debug=$debug_flag"
#raspberry-pi debug build
elif [ "$target_os" == "raspberry-pi" ] && [ "$debug_flag" = true ]; then
gn gen out/"$platform"/"$build_type" "--args='target_os=\"linux\" target_cpu=\"arm\" is_debug=$debug_flag enable_iterator_debugging=false use_debug_fission=false"
else
#raspberry-pi release build
gn gen out/"$platform"/"$build_type" "--args='target_os=\"linux\" target_cpu=\"arm\" is_debug=$debug_flag enable_iterator_debugging=false"
fi
#ninja cmd to compile the required webrtc libraries
webrtc_libs = boringssl boringssl_asm protobuf_lite rtc_p2p rtc_base_approved rtc_base jsoncpp rtc_event logging pc api rtc_pc_base call
errormsg=$( ninja -C out/$build_type/ $webrtc_libs 2>&1)
if [[ "$errormsg" == *"error"* ]] || [[ "$errormsg" == *"fatal"* ]]; then
echo $errormsg
exit 1;
fi
ninja -C out/"$platform"/"$build_type" boringssl boringssl_asm protobuf_lite rtc_p2p rtc_base_approved rtc_base jsoncpp rtc_event logging pc api rtc_pc_base call

99
scripts/get_archives.sh 100644 → 100755
View File

@ -38,54 +38,55 @@ elif [[ "$target_os" == "raspberry-pi" ]]; then
platform="debian-arm"
fi
mkdir -p out/$platform/external/libs
mkdir -p out/libs/$platform/$build_type
#getting the required .o files and .a files to 3rd party libs from webrtc-checkout
#build_type="$build_type"
llvm-ar -rcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/rtc_base/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/rtc_base_approved/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/p2p/rtc_p2p/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/logging/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/rtc_event/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/stringutils/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/timeutils/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/platform_thread_types/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/criticalsection/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/crypto/options/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/pc/rtc_pc_base/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/checks/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/synchronization/sequence_checker/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/synchronization/yield_policy/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/rtc_error/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/system_wrappers/metrics/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/system_wrappers/field_trial/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/logging/ice_log/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/experiments/field_trial_parser/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/transport/stun_types/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/libjingle_peerconnection_api/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/weak_ptr/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/network/sent_packet/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/rtc_numerics/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/third_party/base64/base64/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/task_queue/task_queue/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/system/file_wrapper/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/rtc_base/platform_thread/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/rtc_event_log/rtc_event_log/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/rtp_parameters/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/transport/media/media_transport_interface/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/call/rtp_receiver/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/modules/rtp_rtcp/rtp_rtcp_format/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/media/rtc_media_base/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/units/data_size/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/units/time_delta/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/units/data_rate/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/api/video/video_rtp_headers/*.o
llvm-ar -qcs out/$platform/external/libs/libwebrtc_lite.a webrtc-checkout/src/out/$build_type/obj/pc/media_protocol_names/*.o
Workspace_root=`pwd`
LLVM=$Workspace_root/EdgeVPNio/tools/llvm/bin/llvm-ar
$LLVM -rcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/rtc_base/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/rtc_base_approved/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/p2p/rtc_p2p/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/logging/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/rtc_event/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/stringutils/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/timeutils/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/platform_thread_types/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/criticalsection/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/crypto/options/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/pc/rtc_pc_base/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/checks/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/synchronization/sequence_checker/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/synchronization/yield_policy/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/rtc_error/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/system_wrappers/metrics/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/system_wrappers/field_trial/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/logging/ice_log/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/experiments/field_trial_parser/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/transport/stun_types/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/libjingle_peerconnection_api/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/weak_ptr/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/network/sent_packet/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/rtc_numerics/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/third_party/base64/base64/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/task_queue/task_queue/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/system/file_wrapper/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/rtc_base/platform_thread/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/rtc_event_log/rtc_event_log/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/rtp_parameters/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/transport/media/media_transport_interface/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/call/rtp_receiver/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/modules/rtp_rtcp/rtp_rtcp_format/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/media/rtc_media_base/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/units/data_size/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/units/time_delta/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/units/data_rate/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/api/video/video_rtp_headers/*.o
$LLVM -qcs out/libs/$platform/$build_type/libwebrtc_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/pc/media_protocol_names/*.o
#archives from third-party directory
llvm-ar -rcs out/$platform/external/libs/libboringssl_asm.a webrtc-checkout/src/out/$build_type/obj/third_party/boringssl/boringssl_asm/*.o
llvm-ar -qcs out/$platform/external/libs/libjsoncxx.a webrtc-checkout/src/out/$build_type/obj/third_party/jsoncpp/jsoncpp/json_reader.o webrtc-checkout/src/out/$build_type/obj/third_party/jsoncpp/jsoncpp/json_value.o webrtc-checkout/src/out/$build_type/obj/third_party/jsoncpp/jsoncpp/json_writer.o
llvm-ar -rcs out/$platform/external/libs/libboringssl.a webrtc-checkout/src/out/$build_type/obj/third_party/boringssl/boringssl/*.o
llvm-ar -rcs out/$platform/external/libs/libprotobuf_lite.a webrtc-checkout/src/out/$build_type/obj/third_party/protobuf/protobuf_lite/*.o
llvm-ar -qcs out/$platform/external/libs/libabseil_cpp.a webrtc-checkout/src/out/$build_type/obj/third_party/abseil-cpp/absl/strings/strings/*.o webrtc-checkout/src/out/$build_type/obj/third_party/abseil-cpp/absl/base/throw_delegate/*.o webrtc-checkout/src/out/$build_type/obj/third_party/abseil-cpp/absl/types/bad_optional_access/*.o webrtc-checkout/src/out/$build_type/obj/third_party/abseil-cpp/absl/base/raw_logging_internal/*.o
llvm-ar -rcs out/$platform/external/libs/libsrtp.a webrtc-checkout/src/out/$build_type/obj/third_party/libsrtp/libsrtp/*.o
llvm-ar -rcs out/$platform/external/libs/libc++.a webrtc-checkout/src/out/$build_type/obj/buildtools/third_party/libc++/libc++/*.o
llvm-ar -rcs out/$platform/external/libs/libc++abi.a webrtc-checkout/src/out/$build_type/obj/buildtools/third_party/libc++abi/libc++abi/*.o
$LLVM -rcs out/libs/$platform/$build_type/libboringssl_asm.a webrtc-checkout/src/out/$platform/$build_type/obj/third_party/boringssl/boringssl_asm/*.o
$LLVM -qcs out/libs/$platform/$build_type/libjsoncxx.a webrtc-checkout/src/out/$platform/$build_type/obj/third_party/jsoncpp/jsoncpp/json_reader.o webrtc-checkout/src/out/$platform/$build_type/obj/third_party/jsoncpp/jsoncpp/json_value.o webrtc-checkout/src/out/$platform/$build_type/obj/third_party/jsoncpp/jsoncpp/json_writer.o
$LLVM -rcs out/libs/$platform/$build_type/libboringssl.a webrtc-checkout/src/out/$platform/$build_type/obj/third_party/boringssl/boringssl/*.o
$LLVM -rcs out/libs/$platform/$build_type/libprotobuf_lite.a webrtc-checkout/src/out/$platform/$build_type/obj/third_party/protobuf/protobuf_lite/*.o
$LLVM -qcs out/libs/$platform/$build_type/libabseil_cpp.a webrtc-checkout/src/out/$platform/$build_type/obj/third_party/abseil-cpp/absl/strings/strings/*.o webrtc-checkout/src/out/$platform/$build_type/obj/third_party/abseil-cpp/absl/base/throw_delegate/*.o webrtc-checkout/src/out/$platform/$build_type/obj/third_party/abseil-cpp/absl/types/bad_optional_access/*.o webrtc-checkout/src/out/$platform/$build_type/obj/third_party/abseil-cpp/absl/base/raw_logging_internal/*.o
$LLVM -rcs out/libs/$platform/$build_type/libsrtp.a webrtc-checkout/src/out/$platform/$build_type/obj/third_party/libsrtp/libsrtp/*.o
$LLVM -rcs out/libs/$platform/$build_type/libc++.a webrtc-checkout/src/out/$platform/$build_type/obj/buildtools/third_party/libc++/libc++/*.o
$LLVM -rcs out/libs/$platform/$build_type/libc++abi.a webrtc-checkout/src/out/$platform/$build_type/obj/buildtools/third_party/libc++abi/libc++abi/*.o

83
scripts/get_include.sh 100644 → 100755
View File

@ -1,48 +1,10 @@
#!/bin/bash
# Adds the include headers @ out/$platform/external directory
helpFunction()
{
echo ""
echo "Usage: $0 -b build_type -t target_os"
echo -e "\t-b build_type can be release or debug"
echo -e "\t-t target_os can be ubuntu or raspberry-pi"
exit 1 # Exit script after printing help
}
while getopts b:t: opt
do
case "$opt" in
b ) build_type="$OPTARG" ;;
t ) target_os="$OPTARG" ;;
? ) helpFunction ;; # Print helpFunction in case parameter is non-existent
esac
done
# Print helpFunction in case parameters are empty
if [ -z "$build_type" ] || [ -z "$target_os" ]
then
echo "Some or all of the parameters are empty";
helpFunction
fi
if [ "$build_type" != "debug" ] && [ "$build_type" != "release" ]; then
echo "Wrong build_type spelling"
helpFunction
elif [ "$target_os" != "ubuntu" ] && [ "$target_os" != "raspberry-pi" ]; then
echo "Wrong OS type spelling"
helpFunction
fi
if [[ "$target_os" == "ubuntu" ]]; then
platform="debian-x64"
elif [[ "$target_os" == "raspberry-pi" ]]; then
platform="debian-arm"
fi
# Adds the include headers @ out directory
#getting the required include files and folders from webrtc-checkout
# folders required: absl,api,base,call,common_video,logging,media,modules,p2p,pc,system_wrappers,rtc_base,build,common_types.h, jni.h, logging_buildflags.h
# Script to be run at workspace containing webrtc-checkout
# WORKSPACE_BASE='pwd'
#parameter: $1: src directory, $2: dest directory
#Copies the header files recursively from source webrtc to external/include
@ -53,28 +15,27 @@ copyHeaders()
rsync -am --include='*.h' -f 'hide,! */' $1 $2
}
#mkdir -p out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/third_party/abseil-cpp/absl out/$platform/external/include
copyHeaders webrtc-checkout/src/third_party/abseil-cpp/absl out/$platform/external/include
copyHeaders webrtc-checkout/src/api out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/base out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/call out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/common_video out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/logging/rtc_event_log out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/media out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/modules out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/p2p out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/pc out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/system_wrappers out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/rtc_base out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/third_party/jsoncpp/source/include/json out/$platform/external/include
copyHeaders webrtc-checkout/src/third_party/jsoncpp/generated/version.h out/$platform/external/include/json
copyHeaders webrtc-checkout/src/common_types.h out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/third_party/ffmpeg/libavcodec/jni.h out/$platform/external/include/webrtc
copyHeaders webrtc-checkout/src/third_party/abseil-cpp/absl out/include
copyHeaders webrtc-checkout/src/third_party/abseil-cpp/absl out/include
copyHeaders webrtc-checkout/src/api out/include/webrtc
copyHeaders webrtc-checkout/src/base out/include/webrtc
copyHeaders webrtc-checkout/src/call out/include/webrtc
copyHeaders webrtc-checkout/src/common_video out/include/webrtc
copyHeaders webrtc-checkout/src/logging/rtc_event_log out/include/webrtc
copyHeaders webrtc-checkout/src/media out/include/webrtc
copyHeaders webrtc-checkout/src/modules out/include/webrtc
copyHeaders webrtc-checkout/src/p2p out/include/webrtc
copyHeaders webrtc-checkout/src/pc out/include/webrtc
copyHeaders webrtc-checkout/src/system_wrappers out/include/webrtc
copyHeaders webrtc-checkout/src/rtc_base out/include/webrtc
copyHeaders webrtc-checkout/src/third_party/jsoncpp/source/include/json out/include
copyHeaders webrtc-checkout/src/third_party/jsoncpp/generated/version.h out/include/json
copyHeaders webrtc-checkout/src/common_types.h out/include/webrtc
copyHeaders webrtc-checkout/src/third_party/ffmpeg/libavcodec/jni.h out/include/webrtc
#files other than *.h
mkdir -p out/$platform/external/include/libc++
mkdir -p out/$platform/external/include/libc++abi
cp -r webrtc-checkout/src/buildtools/third_party/libc++/trunk/include out/$platform/external/include/libc++
cp -r webrtc-checkout/src/buildtools/third_party/libc++abi/trunk/include out/$platform/external/include/libc++abi
mkdir -p out/include/libc++
mkdir -p out/include/libc++abi
cp -r webrtc-checkout/src/buildtools/third_party/libc++/trunk/include/* out/include/libc++
cp -r webrtc-checkout/src/buildtools/third_party/libc++abi/trunk/include/* out/include/libc++abi
#mkdir -p /external/include/build && cp webrtc-checkout/src/build/build_config.h "$_"
#cp webrtc-checkout/src/build/buildflag.h /external/include/build