Redefine mpeg2 examples test modules as cc_binary This change redefines the `cc_test` modules within the test directory as `cc_binary` modules. Previously, these `cc_test` modules were effectively acting as wrappers around executable binaries, solely for the purpose of generating test executables. This approach did not allow for the direct installation of these executables on devices. Changing these modules to `cc_binary` allows the resulting executables are produced as standalone binaries, enabling their deployment and execution on test devices. Test: m mpeg2dec Change-Id: I4672a9992003b9f331589d78731a5d0db8283f75
Supports:
Use the following commands for building on the target machine
$ cd external/libmpeg2 $ mkdir build $ cd build $ cmake .. $ make
$ cd external/libmpeg2 $ mkdir build $ cd build $ CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" cmake .. $ make
Update ‘CMAKE_C_COMPILER’, ‘CMAKE_CXX_COMPILER’, ‘CMAKE_C_COMPILER_AR’, and ‘CMAKE_CXX_COMPILER_AR’ in CMAKE_TOOLCHAIN_FILE passed below
$ cd external/libmpeg2 $ mkdir build $ cd build
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake $ make
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake $ make
NOTE: This assumes that you are building on a machine that has Android NDK.
$ cd external/libmpeg2 $ mkdir build $ cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android_toolchain.cmake\
-DMPEG2_ANDROID_NDK_PATH=/opt/android-ndk-r26d/\
-DANDROID_ABI=armeabi-v7a\
-DANDROID_PLATFORM=android-23 ../
make
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android_toolchain.cmake\
-DMPEG2_ANDROID_NDK_PATH=/opt/android-ndk-r26d/\
-DANDROID_ABI=arm64-v8a\
-DANDROID_PLATFORM=android-23 ../
make