1d0b5ac90c7f979606f9c46aae1533e1808c28fa
[processor-sdk/performance-audio-sr.git] / scripts / build_paf_libs.bat
1 @echo off
2 :: *************************************************************************
3 ::  FILE           : build_paf_libs.bat
4 ::  DESCRIPTION    :
5 ::
6 ::     Builds ARM/DSP PAF libraries.
7 ::     Assumes setup_env.bat has been called.
8 ::
9 :: *************************************************************************
11 :: %1:
12 ::  <none>: Build PAF libraries for ARM & DSP
13 ::    DSP : Build PAF libraries for DSP
14 ::    ARM : Build PAF libraries for ARM
15 @echo Executing:  %~fn0 %1
17 if "%PASDK_ROOT_DIR%" == "" set PASDK_ROOT_DIR=%~dp0..
19 set PASDK_ROOT=%PASDK_ROOT_DIR%
21 :: Set PASDK local root directory
22 set PASDK_LROOT_DIR=%PASDK_ROOT_DIR%\pasdk
23 :: Set PAF root directory
24 set PAF_ROOT_DIR=%PASDK_LROOT_DIR%\paf
26 rem
27 rem Temporary "hack" until PAF library make files can detect OS.
28 rem Copy Windows based make files to "working" make files.
29 rem
30 pushd %PAF_ROOT_DIR%\pa\build
31 copy /y rules_a15_windows.mk rules_a15.mk 
32 copy /y rules_windows.mk rules.mk 
33 copy /y target_windows.mk target.mk 
34 copy /y tools_windows.mk tools.mk 
35 popd
37 if "%1"=="ARM" goto arm_libs
39 rem
40 rem DSP libraries
41 rem
43 :dsp_libs
44 set ARCH=c66x
46 pushd %PAF_ROOT_DIR%\pa\asp\com
47 gmake clean ARCH=%ARCH%
48 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
49 popd
51 pushd %PAF_ROOT_DIR%\pa\dec\pcm1
52 gmake clean ARCH=%ARCH%
53 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
54 popd
56 pushd %PAF_ROOT_DIR%\pa\dec\com
57 gmake clean ARCH=%ARCH%
58 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
59 popd
61 pushd %PAF_ROOT_DIR%\pa\asp\std
62 gmake clean ARCH=%ARCH%
63 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
64 popd
66 pushd %PAF_ROOT_DIR%\pa\sio\acp1
67 gmake clean ARCH=%ARCH%
68 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
69 popd
71 pushd %PAF_ROOT_DIR%\pa\enc\pce2
72 gmake clean ARCH=%ARCH%
73 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
74 popd
76 pushd %PAF_ROOT_DIR%\pa\sio\paf
77 gmake clean ARCH=%ARCH%
78 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
79 popd
81 pushd %PAF_ROOT_DIR%\pa\sio\dcs7
82 gmake clean ARCH=%ARCH%
83 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
84 popd
86 pushd %PAF_ROOT_DIR%\pa\util\statusop_common
87 gmake clean ARCH=%ARCH%
88 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
89 popd
91 pushd %PAF_ROOT_DIR%\pa\asp\ae0
92 gmake clean ARCH=%ARCH%
93 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
94 popd
96 pushd %PAF_ROOT_DIR%\pa\asp\ml0
97 gmake clean ARCH=%ARCH%
98 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
99 popd
101 pushd %PAF_ROOT_DIR%\pa\asp\fil
102 gmake clean ARCH=%ARCH%
103 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
104 popd
106 pushd %PAF_ROOT_DIR%\pa\asp\src4
107 gmake clean ARCH=%ARCH%
108 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
109 popd
111 pushd %PAF_ROOT_DIR%\pa\asp\del3
112 gmake clean ARCH=%ARCH%
113 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%C6X_CGT_INSTALL_DIR%
114 popd
116 if "%1"=="DSP" goto end
119 rem
120 rem ARM libraries
121 rem
123 :arm_libs
124 set ARCH=a15
126 pushd %PAF_ROOT_DIR%\pa\asp\com
127 gmake clean ARCH=%ARCH%
128 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%ARM_CGT_INSTALL_DIR%
129 popd
131 pushd %PAF_ROOT_DIR%\pa\dec\pcm1
132 gmake clean ARCH=%ARCH%
133 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%ARM_CGT_INSTALL_DIR%
134 popd
136 pushd %PAF_ROOT_DIR%\pa\dec\com
137 gmake clean ARCH=%ARCH%
138 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%ARM_CGT_INSTALL_DIR%
139 popd
141 pushd %PAF_ROOT_DIR%\pa\asp\std
142 gmake clean ARCH=%ARCH%
143 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%ARM_CGT_INSTALL_DIR%
144 popd
146 pushd %PAF_ROOT_DIR%\pa\sio\acp1
147 gmake clean ARCH=%ARCH%
148 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%ARM_CGT_INSTALL_DIR%
149 popd
151 pushd %PAF_ROOT_DIR%\pa\util\c67x_cintrins
152 gmake clean ARCH=%ARCH%
153 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%ARM_CGT_INSTALL_DIR%
154 popd
156 pushd %PAF_ROOT_DIR%\pa\util\simulate_dma
157 gmake clean ARCH=%ARCH%
158 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%ARM_CGT_INSTALL_DIR%
159 popd
161 pushd %PAF_ROOT_DIR%\pa\util\statusop_common
162 gmake clean ARCH=%ARCH%
163 gmake install ROOTDIR=%PAF_ROOT_DIR% ARCH=%ARCH% CG_TOOLS=%ARM_CGT_INSTALL_DIR%
164 popd
167 :cleanupenv
168 set PASDK_ROOT=
169 set PASDK_LROOT_DIR=
170 set PAF_ROOT_DIR=
171 set ARCH=
173 :end