]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - build_all.bat
9124d0dec30b219fc59a0a5ef070799db867be4a
[processor-sdk/performance-audio-sr.git] / build_all.bat
1 @echo off
3 :: *************************************************************************
4 ::  FILE           : build_all.bat
5 ::  DESCRIPTION    :
6 ::
7 ::      Builds all for Dolby Harmony or DTS:X project for DA10x. This includes:
8 ::          (1) DSP PDK LLD libraries: UART, SPI, I2C
9 ::          (2) ARM/DSP PAF libraries
10 ::          (3) ARM/DSP algorithm components libraries, either of:
11 ::              - Dolby Harmony component libraries: BMDA, CAR, DDP, MAT-THD, OAR
12 ::              - DTS:X component libraries: DTS:X Decoder, PARMA
13 ::          (4) DSP PDK platform library
14 ::          (5) ARM/DSP applications
15 ::      Creates .zip packages for Dolby Harmony component libraries.
16 ::
17 :: *************************************************************************
19 @echo Executing:  %~fn0 %1 %2 %3
21 :: *************************************************************************
22 :: *** Check command line input
23 :: *************************************************************************
24 if "%1"=="" goto use_err1
25 if "%2"=="" goto use_err1
26 if "%3"=="" goto use_err1
27 goto cont1
30 :use_err1
31 :: USAGE ERROR
32 echo ERROR: Supplied options are invalid.
33 echo .
34 echo . Usage: %0 ^<buildType^> SuperRepo ^<buildProfile^>
35 echo . -OR-
36 echo . Usage: %0 ^<buildType^> ^<buildTag^> ^<buildProfile^>
37 echo .
38 echo .     buildType        : DH, DTSX, NOIP, ALLIP, ALL
39 echo .     SuperRepo        : Use Git super-repository to track submodules for build targets
40 echo .     buildTag         : Use Git tag to track submodules for build targets 
41 echo .     buildProfile     : Debug, Release, or SDF
42 echo .
43 goto end
46 :cont1
47 :: Set PASDK root directory
48 set PASDK_ROOT_DIR=%~dp0
49 if "%PASDK_ROOT_DIR:~-1%"=="\" set PASDK_ROOT_DIR=%PASDK_ROOT_DIR:~0,-1%
51 if "%3" NEQ "SDF" goto install_tools
52 :: Set PASDK target and version
53 set PASDK_TARGET_PLATFORM=k2g
54 set PASDK_VERSION=01_01_00_01
55 :: Set FD package version
56 set FD_PKG_VERSION=01_01_00_01
58 :: Set release directory
59 set RELEASE_DIR=%PASDK_ROOT_DIR%\release
60 :: Set FD package directory
61 set FD_PKG_DIR=%RELEASE_DIR%\fd_package
62 :: Set OS package directory
63 set OS_PKG_DIR=%RELEASE_DIR%\os_package
65 :: Set DH-IP package directory
66 set DHIP_PKG_DIR=%RELEASE_DIR%\dhip_package
67 :: Set DTSX-IP package directory
68 set DTSXIP_PKG_DIR=%RELEASE_DIR%\dtsxip_package
70 if exist %RELEASE_DIR%\nul ( rmdir /S / Q %RELEASE_DIR% )
73 :install_tools
74 :: *************************************************************************
75 :: *** Install tools
76 :: *************************************************************************
77 :: FL: tool installation not yet supported
78 ::@call scripts\install_tools.bat
79 @call scripts\setup_env.bat
81 :: *************************************************************************
82 :: *** Install code
83 :: *************************************************************************
84 @call scripts\install_code.bat %2
86 :: *************************************************************************
87 :: *** Build
88 :: *************************************************************************
89 :: Build DSP PDK LLD libraries
90 rem @pushd scripts
91 rem @cmd /c build_pdk_libs.bat
92 rem @popd
94 :: Build ARM/DSP PAF libraries
95 @pushd scripts
96 @call build_paf_libs.bat
97 @popd
99 :: Build ARM/DSP component libraries
100 :build_dh_libs
101 set TRUE=
102 if "%1"=="DH" set TRUE=1
103 if "%1"=="ALLIP" set TRUE=1
104 if "%1"=="ALL" set TRUE=1
105 if defined TRUE (
106     rem Build Dolby Harmony component libraries
107     @pushd scripts
108     @call build_dh_libs.bat
109     @popd
111     if "%3"=="SDF" (
112         rem Build DH-IP packages
113         @pushd scripts
114         @call build_dhip_pkgs %DHIP_PKG_DIR%
115         @popd
116         
117         rem Install DH-IP packages
118         @pushd scripts
119         @call install_dhip_pkgs %DHIP_PKG_DIR%
120         @popd
121     )
124 :build_dtsx_libs
125 set TRUE=
126 if "%1"=="DTSX" set TRUE=1
127 if "%1"=="ALLIP" set TRUE=1
128 if "%1"=="ALL" set TRUE=1
129 if defined TRUE (
130     rem Build DTS:X component libraries
131     @pushd scripts
132     @call build_dtsx_libs.bat
133     @call build_parma_libs.bat
134     @popd
136     if "%3"=="SDF" (
137         rem Build DTSX-IP packages
138         @pushd scripts
139         @call build_dtsxip_pkgs %DTSXIP_PKG_DIR%
140         @popd
141         
142         rem Install DH-IP packages
143         @pushd scripts
144         @call install_dtsxip_pkgs %DTSXIP_PKG_DIR%
145         @popd
146     )
149 :build_ccs_projects
150 :: Build CCS projects
151 @pushd scripts
152 @call build_ccs_projects.bat %1 %3
153 @popd
155 if "%3" NEQ "SDF" goto cleanupenv
156 :: Build FD package
157 @pushd scripts
158 @call build_fd_pkg.bat %FD_PKG_DIR%
159 @popd
161 :: Build OS package
162 @pushd scripts
163 @call build_os_pkg.bat %OS_PKG_DIR%
164 @popd
167 :cleanupenv
168 set PASDK_ROOT_DIR=
169 set PASDK_TARGET_PLATFORM=
170 set PASDK_VERSION=
171 set FD_PKG_VERSION=
172 set RELEASE_DIR=
173 set FD_PKG_DIR=
174 set OS_PKG_DIR=
175 set DHIP_PKG_DIR=
176 set DTSXIP_PKG_DIR=
177 set TRUE=
179 :end