FreeCalypso > hg > tcs211-l1-reconst
comparison gpf/BIN/m.bat @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 @echo off | |
2 @pushd | |
3 rem ----------------------------------------------------------------------------- | |
4 rem Project : | |
5 rem Modul : | |
6 rem ----------------------------------------------------------------------------- | |
7 rem Copyright 2002 Texas Instruments Berlin, AG | |
8 rem All rights reserved. | |
9 rem | |
10 rem This file is confidential and a trade secret of Texas | |
11 rem Instruments Berlin, AG | |
12 rem The receipt of or possession of this file does not convey | |
13 rem any rights to reproduce or disclose its contents or to | |
14 rem manufacture, use, or sell anything it may describe, in | |
15 rem whole, or in part, without the specific written consent of | |
16 rem Texas Instruments Berlin, AG. | |
17 rem ----------------------------------------------------------------------------- | |
18 rem | Purpose : | |
19 rem ----------------------------------------------------------------------------- | |
20 setlocal | |
21 | |
22 @if x%_4ver% == x goto Need4NT | |
23 | |
24 set FRAME_ALL=0 | |
25 @if x"%PROJECT%" != x"" unset PROJECT | |
26 @if x"%TARGET%" != x"" unset TARGET | |
27 @if x"%PLATFORM%" != x"" unset PLATFORM | |
28 @if x"%DEBUG%" != x"" unset DEBUG | |
29 | |
30 @if x"%1" == x"" goto How2Use | |
31 | |
32 :check_options | |
33 iff x"%1" == x"-debug" then | |
34 echo on | |
35 shift | |
36 goto check_options | |
37 endiff | |
38 iff x"%1" == x"-n" then | |
39 set MAKEFLAGS=%MAKEFLAGS%n | |
40 shift | |
41 goto check_options | |
42 endiff | |
43 | |
44 @rem select for type | |
45 @if x"%1" == x"frame" goto frame_set | |
46 @if x"%1" == x"ccd" goto ccd_set | |
47 @if x"%1" == x"xpan" goto xpan | |
48 @if x"%1" == x"pco" goto pco | |
49 @if x"%1" == x"tap" goto tap | |
50 @if x"%1" == x"ccddata" goto ccddata | |
51 | |
52 @if x%2 == x goto How2Use | |
53 | |
54 | |
55 rem ------ FRAME and CCD --------------- | |
56 rem ------------------------------------ | |
57 :ccd_set | |
58 @rem Set project and OS name! | |
59 @if x%3 == x goto How2Use | |
60 | |
61 set PROJECT=%2 | |
62 set TARGET=%3 | |
63 set PLATFORM=%4 | |
64 | |
65 @rem Set the name extension for the library! | |
66 set libext=lib | |
67 @if "x%3" == "xwin32" set libext=dll | |
68 @if "x%3" == "xvxworks" set libext=a | |
69 echo libext=%libext% | |
70 goto option_set | |
71 | |
72 :frame_set | |
73 set TARGET=%2 | |
74 set PLATFORM=%3 | |
75 | |
76 @rem Set the name extension for the library! | |
77 set libext=lib | |
78 @if "x%2" == "xwin32" set libext=dll | |
79 @if "x%2" == "xvxworks" set libext=a | |
80 echo libext=%libext% | |
81 | |
82 :option_set | |
83 @rem Initialize the environment variables needed by makefiles! | |
84 set TRACE=0 | |
85 set ROUTING=0 | |
86 set FAX=0 | |
87 set MEMSUPER=0 | |
88 set DEBUG=0 | |
89 set ALR=0 | |
90 set PCON=0 | |
91 set RUN_INT_RAM=0 | |
92 set RUN_FLASH=0 | |
93 | |
94 @rem Parse the command line options! | |
95 for %option in (%3 %4 %5 %6 %7 %8 %9) do ( | |
96 if "%option%" == "tr" set TRACE=1 | |
97 && if "%option%" == "rt" set ROUTING=1 | |
98 && if "%option%" == "ps" set MEMSUPER=2 | |
99 && if "%option%" == "db" set DEBUG=1 | |
100 && if "%option%" == "al" set ALR=1 | |
101 && if "%option%" == "pn" set PCON=1 | |
102 && if "%option%" == "fl" set RUN_FLASH=1 | |
103 && if "%option%" == "ir" set RUN_INT_RAM=1 | |
104 ) | |
105 | |
106 echo PROJECT=%PROJECT% | |
107 echo TARGET=%TARGET% | |
108 echo PLATFORM=%PLATFORM% | |
109 echo MEMSUPER=%MEMSUPER% | |
110 echo DEBUG=%DEBUG% | |
111 echo PCON=%PCON% | |
112 echo RUN_FLASH=%RUN_FLASH% | |
113 echo RUN_INT_RAM=%RUN_INT_RAM% | |
114 | |
115 REM use clearmake if under ClearCase | |
116 REM default is gnumake: | |
117 set MAKE=gnumake | |
118 REM is clearcase installed ? | |
119 if "%CLEARCASE_PRIMARY_GROUP%" == "" goto use_gnu | |
120 REM are we using a clearcase view ? | |
121 cleartool lsview -cview >nul 2>>&1 | |
122 if errorlevel 1 goto use_gnu | |
123 REM on a clearcase view: use clearmake in gnu mode: | |
124 set MAKE=clearmake -V -C gnu SHELL=%TESTDRIVE%/gpf/tools/bin/sh.exe | |
125 echo Using clearmake | |
126 goto build | |
127 :use_gnu | |
128 echo Using gnumake | |
129 | |
130 :build | |
131 @rem ---- build library name ----------------------- | |
132 @rem 1. The "first name" of the lib (frame, tif, misc,..) | |
133 for %option in (%3 %4 %5 %6 %7 %8 %9) do ( | |
134 if "%option%" == "frame" set TARGET_LIB=%option && | |
135 if "%option%" == "tif" set TARGET_LIB=%option && | |
136 if "%option%" == "misc" set TARGET_LIB=%option | |
137 ) | |
138 | |
139 :---- target operating system ------------------- | |
140 @iff "%TARGET"=="vxworks" then | |
141 set TOOL= | |
142 rem INKEY What toolchain ? (D)IAB or (G)NU: %%key | |
143 set key=g | |
144 iff "%key"=="D" then | |
145 @rem !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
146 @rem ToDo: This belongs to "initproj.bat" !!! | |
147 set DIABLIB=c:/diab/4.3g | |
148 @rem !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
149 set TOOL=diab | |
150 endiff | |
151 iff "%key"=="G" then | |
152 set TOOL=gnu | |
153 set CPU=PPC603 | |
154 endiff | |
155 if "%TOOL"=="" goto How2Use | |
156 | |
157 @rem for the DIAB compiler TARGET means the target CPU | |
158 set TARGET_OS=vxworks | |
159 if not exist %DEV%\project\%PROJECT%\lib\%TARGET_OS% md /s %DEV%\project\%PROJECT%\lib\%TARGET_OS% | |
160 @endiff | |
161 | |
162 @rem Use the corresponding makefile for gnumake.exe! | |
163 @if x"%1" == x"frame" goto frame | |
164 @if x"%1" == x"ccd" goto ccd | |
165 | |
166 | |
167 rem ------ FRAME ------------------------- | |
168 rem ------------------------------------ | |
169 | |
170 :frame | |
171 @if x%2 == xnuc goto nuc_frame | |
172 | |
173 @if x%2 == xvxworks goto no_copt_del | |
174 @echo deleting c.opt | |
175 if exist %GPF%\frame\c.opt del %GPF%\frame\c.opt | |
176 if exist %GPF%\misc\c.opt del %GPF%\misc\c.opt | |
177 if exist %GPF%\tst\c.opt del %GPF%\tst\c.opt | |
178 | |
179 :no_copt_del | |
180 @if x%3 == xframe goto frame_frame | |
181 @if x%3 == xmisc goto frame_misc | |
182 @if x%3 == xtif goto frame_tif | |
183 @if x%3 == xosx goto frame_osx | |
184 @if x%3 == xclean goto check_frame_clean | |
185 @if x%3 == xlabel goto check_frame_label | |
186 @if x%3 == xdepend goto check_frame_depend | |
187 goto frame_all | |
188 | |
189 :check_frame_clean | |
190 @echo Cleaning frame ... | |
191 @if x%4 == xframe goto clean_frame_frame | |
192 @if x%4 == xmisc goto clean_frame_misc | |
193 @if x%4 == xtif goto clean_frame_tif | |
194 @if x%4 == xosx goto clean_frame_osx | |
195 goto clean_frame_all | |
196 | |
197 :nuc_frame | |
198 @if x%4 == xframe goto frame_frame | |
199 @if x%4 == xmisc goto frame_misc | |
200 @if x%4 == xtif goto frame_tif | |
201 @if x%4 == xosx goto frame_osx | |
202 @if x%4 == xclean goto check_nuc_frame_clean | |
203 @if x%4 == xlabel goto check_frame_label | |
204 @if x%4 == xdepend goto check_frame_depend | |
205 goto frame_all | |
206 | |
207 :check_nuc_frame_clean | |
208 @echo Cleaning frame ... | |
209 @if x%5 == xframe goto clean_frame_frame | |
210 @if x%5 == xmisc goto clean_frame_misc | |
211 @if x%5 == xtif goto clean_frame_tif | |
212 @if x%5 == xosx goto clean_frame_osx | |
213 goto clean_frame_all | |
214 | |
215 :frame_all | |
216 @iff x%2 == xwin32 then | |
217 cd %GPF%\frame | |
218 echo frame.lib : | |
219 %MAKE% implib | |
220 if %? != 0 goto end | |
221 endiff | |
222 set FRAME_ALL=1 | |
223 | |
224 :frame_misc | |
225 cd %GPF%\misc | |
226 echo misc.%libext%: | |
227 iff "x%3" == "xvxworks" .AND. "%TOOL%" == "diab" then | |
228 set TARGET_LIB=misc | |
229 clearmake -C gnu -f dmakefile | |
230 @else | |
231 %MAKE% misc.%libext% | |
232 @endiff | |
233 if %? != 0 goto end | |
234 if %FRAME_ALL% != 1 goto end | |
235 | |
236 :frame_tif | |
237 cd %GPF%\TST | |
238 echo tif.%libext%: | |
239 iff "x%3" == "xvxworks" .AND. "%TOOL%" == "diab" then | |
240 set TARGET_LIB=tif | |
241 clearmake -C gnu -f dmakefile | |
242 @else | |
243 %MAKE% tif.%libext% | |
244 @endiff | |
245 if %? != 0 goto end | |
246 if %FRAME_ALL% != 1 goto end | |
247 | |
248 :frame_frame | |
249 cd %GPF%\FRAME | |
250 echo frame.%libext%: | |
251 iff "x%3" == "xvxworks" .AND. "%TOOL%" == "diab" then | |
252 set TARGET_LIB=frame | |
253 clearmake -C gnu -f dmakefile | |
254 @else | |
255 %MAKE% frame.%libext% | |
256 @endiff | |
257 goto end | |
258 | |
259 :frame_osx | |
260 cd %GPF%\FRAME\cust_os | |
261 echo osx.%libext% | |
262 %MAKE% osx.%libext% | |
263 goto end | |
264 | |
265 | |
266 @rem Clean frame, misc and tif! | |
267 :clean_frame_all | |
268 echo Clean frame, misc and tif! | |
269 cd %GPF%\frame | |
270 iff "x%3" == "xvxworks" .AND. "%TOOL%" == "diab" then | |
271 set TARGET_LIB=frame | |
272 clearmake -C gnu -f dmakefile clean | |
273 @else | |
274 %MAKE% clean | |
275 @endiff | |
276 cd %GPF%\tst | |
277 iff "x%3" == "xvxworks" .AND. "%TOOL%" == "diab" then | |
278 set TARGET_LIB=tif | |
279 clearmake -C gnu -f dmakefile clean | |
280 @else | |
281 %MAKE% clean | |
282 @endiff | |
283 cd %GPF%\misc | |
284 iff "x%3" == "xvxworks" .AND. "%TOOL%" == "diab" then | |
285 set TARGET_LIB=misc | |
286 clearmake -C gnu -f dmakefile clean | |
287 @else | |
288 %MAKE% clean | |
289 @endiff | |
290 goto end | |
291 | |
292 :clean_frame_frame | |
293 cd %GPF%\FRAME | |
294 echo cleaning frame.%libext% | |
295 iff "x%3" == "xvxworks" .AND. "%TOOL%" == "diab" then | |
296 set TARGET_LIB=frame | |
297 clearmake -C gnu -f dmakefile clean | |
298 @else | |
299 %MAKE% clean | |
300 @endiff | |
301 goto end | |
302 | |
303 :clean_frame_misc | |
304 @cd %GPF%\MISC | |
305 @echo cleaning misc.%libext% | |
306 iff "x%3" == "xvxworks" .AND. "%TOOL%" == "diab" then | |
307 set TARGET_LIB=misc | |
308 clearmake -C gnu -f dmakefile clean | |
309 @else | |
310 %MAKE% clean | |
311 @endiff | |
312 goto end | |
313 | |
314 :clean_frame_tif | |
315 cd %GPF%\TST | |
316 @echo cleaning tif.%libext% | |
317 iff "x%3" == "xvxworks" .AND. "%TOOL%" == "diab" then | |
318 set TARGET_LIB=tif | |
319 clearmake -C gnu -f dmakefile clean | |
320 @else | |
321 %MAKE% clean | |
322 @endiff | |
323 goto end | |
324 | |
325 :clean_frame_osx | |
326 cd %GPF%\FRAME\cust_os | |
327 echo cleaning osx.%libext% | |
328 %MAKE% clean | |
329 goto end | |
330 | |
331 | |
332 :check_frame_depend | |
333 @if x%5 == xframe goto depend_frame_frame | |
334 @if x%5 == xmisc goto depend_frame_misc | |
335 @if x%5 == xtif goto depend_frame_tif | |
336 goto depend_frame_all | |
337 | |
338 :check_frame_label | |
339 @if x%6 == xframe goto label_frame_frame | |
340 @if x%6 == xmisc goto label_frame_misc | |
341 @if x%6 == xtif goto label_frame_tif | |
342 goto label_frame_all | |
343 | |
344 | |
345 @rem label frame, misc and tif! | |
346 :label_frame_all | |
347 @echo labling all frame-stuff | |
348 cd %GPF%\FRAME | |
349 %MAKE% label LABEL=%5 | |
350 cd %GPF%\TST | |
351 %MAKE% label LABEL=%5 | |
352 cd %GPF%\MISC | |
353 %MAKE% label LABEL=%5 | |
354 goto end | |
355 | |
356 :label_frame_frame | |
357 cd %GPF%\FRAME | |
358 echo labling frame.%libext%-stuff | |
359 %MAKE% label LABEL=%5 | |
360 goto end | |
361 | |
362 :label_frame_misc | |
363 @cd %GPF%\MISC | |
364 @echo labeling misc.%libext%-stuff | |
365 %MAKE% label LABEL=%5 | |
366 goto end | |
367 | |
368 :label_frame_tif | |
369 cd %GPF%\TST | |
370 @echo labling tif.%libext%-stuff | |
371 %MAKE% label LABEL=%5 | |
372 goto end | |
373 | |
374 | |
375 @rem Generate dependencies | |
376 :depend_frame_all | |
377 cd %GPF%\FRAME | |
378 echo Generating dependencies for frame | |
379 %MAKE% depend | |
380 cd %GPF%\TST | |
381 echo Generating dependencies for tif | |
382 %MAKE% depend | |
383 cd %GPF%\MISC | |
384 echo Generating dependencies for misc | |
385 %MAKE% depend | |
386 goto end | |
387 | |
388 :depend_frame_frame | |
389 cd %GPF%\FRAME | |
390 echo Generating dependencies for frame | |
391 %MAKE% depend | |
392 goto end | |
393 | |
394 :depend_frame_misc | |
395 cd %GPF%\MISC | |
396 echo Generating dependencies for misc | |
397 %MAKE% depend | |
398 goto end | |
399 | |
400 :depend_frame_tif | |
401 cd %GPF%\TST | |
402 echo Generating dependencies for tif | |
403 %MAKE% depend | |
404 goto end | |
405 | |
406 rem ------ CCD ------------------------- | |
407 rem ------------------------------------ | |
408 :ccd | |
409 if %MEMSUPER% == 2 set MEMSUPER=1 | |
410 if "%TARGET%" == "nuc" shift | |
411 @if x%4 == xclean goto clean_ccd | |
412 @if x%4 == xdepend goto depend_ccd | |
413 | |
414 cd %GPF%\CCD | |
415 @echo ccd.%libext%: | |
416 gnumake | |
417 goto end | |
418 | |
419 :clean_ccd | |
420 cd %GPF%\CCD | |
421 @echo cleaning ccd.%libext% ... | |
422 gnumake clean | |
423 goto end | |
424 | |
425 :depend_ccd | |
426 cd %GPF%\CCD | |
427 @echo Generating dependencies for ccd | |
428 gnumake depend | |
429 goto end | |
430 | |
431 rem ------ XPAN ------------------------- | |
432 rem ------------------------------------ | |
433 :xpan | |
434 cd %GPF%\util\xpanel | |
435 @echo xpanel: | |
436 gnumake %2 %3 %4 %5 %6 %7 %8 %9 | |
437 goto end | |
438 | |
439 | |
440 rem ------ PCO ------------------------- | |
441 rem ------------------------------------ | |
442 :pco | |
443 cd %GPF%\util\pco | |
444 @echo pco: | |
445 gnumake %2 %3 %4 %5 %6 %7 %8 %9 | |
446 goto end | |
447 | |
448 | |
449 rem ------ TAP ------------------------- | |
450 rem ------------------------------------ | |
451 :tap | |
452 cd %GPF%\TAP | |
453 echo gnumake %2$ | |
454 gnumake %2$ | |
455 goto end | |
456 | |
457 rem ------ ccddata DLL ----------------- | |
458 rem ------------------------------------ | |
459 :ccddata | |
460 cd %GPF%\CCD | |
461 echo gnumake -f ccddata.mk %2$ | |
462 gnumake -f ccddata.mk %2$ | |
463 goto end | |
464 | |
465 rem ------ GENERAL ------------------------- | |
466 rem ------------------------------------ | |
467 :Need4NT | |
468 @echo "Error: 4DOS or 4NT is needed | |
469 @goto end | |
470 | |
471 :How2Use | |
472 text | |
473 Usage: | |
474 | |
475 m [-n] <configuration> | |
476 -> option "-n" will only test making of the chosen configuration | |
477 | |
478 <configuration>: | |
479 m frame <target> [<platform>] [clean|depend|label <labelname>] [<lib>] [db] [ps] [pn] [ir] [fl] [su] [al]" | |
480 m ccd <project> <target> [clean] [tr] [rt] [db] | |
481 project : gsm, gprs, g23net, tools | |
482 target : nuc, psos(g23net only), vxworks(g23net only), win32 | |
483 lib : frame, misc, tif, all(=frame+misc+tif...default) | |
484 Examples: m frame nuc arm7 frame db ps | |
485 m frame nuc arm7 frame db ir -> generates to lib containing internal RAM code | |
486 m frame nuc arm7 frame db fl -> generates to lib containing FLASH code | |
487 m frame nuc pc all db | |
488 m frame psos tif db ps | |
489 m frame vxworks all db | |
490 m frame win32 db | |
491 m frame nuc arm7 clean db | |
492 --> deletes *.obj and lib of frame, misc and tif | |
493 m ccd g23net nuc pc tr db | |
494 m ccd g23net nuc arm7 clean tr db | |
495 --> deletes *.obj and lib of CCD | |
496 m {xpan|pco} [help|<xpan make options>|<pco make options>] | |
497 Examples: m xpan DEBUG=1 | |
498 m xpan help | |
499 m pco GUI=0 | |
500 m pco clean | |
501 m tap [<tap make options>] | |
502 Examples: m tap | |
503 m ccddata [help|<ccddata make options>] | |
504 endtext | |
505 | |
506 :end | |
507 rem restore MAKEFLAGS | |
508 endlocal | |
509 @popd |