#!/bin/bash

# Invoke this from the root of an internal Android tree. It will create
# links to build swiftshader as vendor code in vendor/swiftshader

pushd $(dirname "$0") > /dev/null 2>&1
DIR="$(pwd)"
popd > /dev/null 2>&1

OUT="$(pwd)/vendor/swiftshader"
mkdir -p "${OUT}"
ln -s "${DIR}/.dir-locals.el" "${OUT}"

IFS=$'\n'
for i in $(find "${DIR}/src" -name Android.mk -print); do
  ln -s "$(dirname "${i}" )" "${OUT}"
done
unset IFS

#!/bin/bash

# Invoke this from the root of an internal Android tree. It will create
# links to build swiftshader as vendor code in vendor/swiftshader

set -o errexit

pushd $(dirname "$0") > /dev/null 2>&1
DIR="$(pwd)"
popd > /dev/null 2>&1

OUT="$(pwd)/vendor/transgaming/swiftshader-src"

JOBS=$(grep '^processor' /proc/cpuinfo | wc -l)

rm -rf "${OUT}"
mkdir -p "${OUT}"
ln -s "${DIR}/.dir-locals.el" "${OUT}"

IFS=$'\n'
for i in $(find "${DIR}/src" -name Android.mk -print); do
  ln -s "$(dirname "${i}" )" "${OUT}"
done
unset IFS
. build/envsetup.sh
lunch gce_x86-userdebug
. device/google/gce_x86/configure_java.sh
rm -rf vendor/transgaming/swiftshader/x86
make -j ${JOBS} \
    libEGL_swiftshader_vendor_debug \
    libEGL_swiftshader_vendor_release \
    libGLESv1_CM_swiftshader_vendor_debug \
    libGLESv1_CM_swiftshader_vendor_release \
    libGLESv2_swiftshader_vendor_debug \
    libGLESv2_swiftshader_vendor_release

Enhance the vendor script to build the libraries
Enhance the vendor script to build the libraries

Change-Id: I9e018591dc04ad1b79634f5d3164ae3d8ca13cfd
Reviewed-on: https://swiftshader-review.googlesource.com/3060
Reviewed-by: Nicolas Capens <0612353e1fcebbfd4b302d9337447ca0cdfa9122@google.com>
Tested-by: Greg Hartman <1491e78df1ea2169b62fa2ceaf1a32538792aab8@google.com>
