diff --git a/build_all.bat b/build_all.bat
index 1b7e45a5eac1f8b98da5c3eae2fa1b99809cf975..84d989e6c1f93c146cde2e88d7eda11d7e4d363b 100644 (file)
--- a/build_all.bat
+++ b/build_all.bat
@echo off
+
:: *************************************************************************
:: FILE : build_all.bat
:: DESCRIPTION :
::
-:: Builds all for Dolby Harmony project for DA10x. This includes:
-:: (1) ARM/DSP PAF libraries
-:: (2) ARM/DSP Atmos component libraries: BMDA, CAR, DDP, MAT-THD, OAR
-:: (3) DSP PDK LLD libraries: UART, SPI, I2C
+:: Builds all for Dolby Harmony or DTS:X project for DA10x. This includes:
+:: (1) DSP PDK LLD libraries: UART, SPI, I2C
+:: (2) ARM/DSP PAF libraries
+:: (3) ARM/DSP algorithm components libraries, either of:
+:: - Dolby Harmony component libraries: BMDA, CAR, DDP, MAT-THD, OAR
+:: - DTS:X component libraries: DTS:X Decoder, PARMA
:: (4) DSP PDK platform library
:: (5) ARM/DSP applications
-:: Creates .zip packages for Atmos component libraries.
+:: Creates .zip packages for Dolby Harmony component libraries.
::
:: *************************************************************************
-@echo Executing: %~fn0 %1 %2
+@echo Executing: %~fn0 %1 %2 %3
:: *************************************************************************
:: *** Check command line input
:: *************************************************************************
if "%1"=="" goto use_err1
if "%2"=="" goto use_err1
+if "%3"=="" goto use_err1
goto cont1
:: USAGE ERROR
echo ERROR: Supplied options are invalid.
echo .
-echo . Usage: %0 SuperRepo ^<buildProfile^>
+echo . Usage: %0 ^<buildType^> SuperRepo ^<buildProfile^>
echo . -OR-
-echo . Usage: %0 ^<buildTag^> ^<buildProfile^>
+echo . Usage: %0 ^<buildType^> ^<buildTag^> ^<buildProfile^>
echo .
+echo . buildType : DH, DTSX, NOIP, ALLIP, ALL
echo . SuperRepo : Use Git super-repository to track submodules for build targets
echo . buildTag : Use Git tag to track submodules for build targets
echo . buildProfile : Debug, Release, or SDF
:cont1
+:: Set PASDK root directory
set PASDK_ROOT_DIR=%~dp0
+if "%PASDK_ROOT_DIR:~-1%"=="\" set PASDK_ROOT_DIR=%PASDK_ROOT_DIR:~0,-1%
+if "%3" NEQ "SDF" goto install_tools
+:: Set PASDK target and version
+set PASDK_TARGET_PLATFORM=k2g
+set PASDK_VERSION=01_00_00_06
+:: Set FD package version
+set FD_PKG_VERSION=01_00_00_06
-if "%2" NEQ "SDF" goto install_tools
:: Set release directory
-set RELEASE_DIR=%PASDK_ROOT_DIR%release
-:: Set DH-IP package directory
-set DHIP_PKG_DIR=%RELEASE_DIR%\dhip_package
+set RELEASE_DIR=%PASDK_ROOT_DIR%\release
:: Set FD package directory
set FD_PKG_DIR=%RELEASE_DIR%\fd_package
:: Set OS package directory
set OS_PKG_DIR=%RELEASE_DIR%\os_package
+:: Set DH-IP package directory
+set DHIP_PKG_DIR=%RELEASE_DIR%\dhip_package
+:: Set DTSX-IP package directory
+set DTSXIP_PKG_DIR=%RELEASE_DIR%\dtsxip_package
+
if exist %RELEASE_DIR%\nul ( rmdir /S / Q %RELEASE_DIR% )
:: *************************************************************************
:: *** Install code
:: *************************************************************************
-@call scripts\install_code.bat %1
+@call scripts\install_code.bat %2
:: *************************************************************************
:: *** Build
:: *************************************************************************
+:: Build DSP PDK LLD libraries
+rem @pushd scripts
+rem @cmd /c build_pdk_libs.bat
+rem @popd
+
:: Build ARM/DSP PAF libraries
@pushd scripts
@call build_paf_libs.bat
@popd
-:: Build ARM/DSP Atmos component libraries
-@pushd scripts
-@call build_alg_libs.bat
-@popd
-
-:: Build DSP PDK LLD libraries
-@pushd scripts
-@call build_pdk_libs.bat
-@popd
-:: FL: brute force reset PDK environment setup. Clean this up later.
-@call scripts\setup_env.bat
-
-if "%2" NEQ "SDF" goto build_ccs_projects
-:: Build DH-IP packages
-@pushd scripts
-@call build_dhip_pkgs %DHIP_PKG_DIR%
-@popd
+:: Build ARM/DSP component libraries
+:build_dh_libs
+set TRUE=
+if "%1"=="DH" set TRUE=1
+if "%1"=="ALLIP" set TRUE=1
+if "%1"=="ALL" set TRUE=1
+if defined TRUE (
+ rem Build Dolby Harmony component libraries
+ @pushd scripts
+ @call build_dh_libs.bat
+ @popd
+
+ if "%3"=="SDF" (
+ rem Build DH-IP packages
+ @pushd scripts
+ @call build_dhip_pkgs %DHIP_PKG_DIR%
+ @popd
+
+ rem Install DH-IP packages
+ @pushd scripts
+ @call install_dhip_pkgs %DHIP_PKG_DIR%
+ @popd
+ )
+)
+
+:build_dtsx_libs
+set TRUE=
+if "%1"=="DTSX" set TRUE=1
+if "%1"=="ALLIP" set TRUE=1
+if "%1"=="ALL" set TRUE=1
+if defined TRUE (
+ rem Build DTS:X component libraries
+ @pushd scripts
+ @call build_dtsx_libs.bat
+ @call build_parma_libs.bat
+ @popd
+
+ if "%3"=="SDF" (
+ rem Build DTSX-IP packages
+ @pushd scripts
+ @call build_dtsxip_pkgs %DTSXIP_PKG_DIR%
+ @popd
+
+ rem Install DH-IP packages
+ @pushd scripts
+ @call install_dtsxip_pkgs %DTSXIP_PKG_DIR%
+ @popd
+ )
+)
:build_ccs_projects
-:: Build DSP PDK platform library, ARM/DSP applications
+:: Build CCS projects
@pushd scripts
-@call build_ccs_projects.bat %2 %DHIP_PKG_DIR%
+@call build_ccs_projects.bat %1 %3
@popd
-if "%2" NEQ "SDF" goto cleanupenv
+if "%3" NEQ "SDF" goto cleanupenv
:: Build FD package
@pushd scripts
@call build_fd_pkg.bat %FD_PKG_DIR%
:cleanupenv
set PASDK_ROOT_DIR=
-set ARTIFACTS_DIR=
-set DHIP_PKG_DIR=
+set PASDK_TARGET_PLATFORM=
+set PASDK_VERSION=
+set FD_PKG_VERSION=
+set RELEASE_DIR=
set FD_PKG_DIR=
set OS_PKG_DIR=
-
+set DHIP_PKG_DIR=
+set DTSXIP_PKG_DIR=
+set TRUE=
:end