1@echo off
2:: created by pdelaage on 20100928
3:: usage : makece ARMV4|X86|... other cpus: see bat scripts in evc/bin
4::     eg  makece X86, makece X86 clean
5::     makece <=> makece ARMV4 all
6:: NEVER DO makece clean ! but makece TARGETCPU clean !
7:: Note : adapt EVC/bin/WCE<target>.bat scripts
8Title WCE STUNNEL
9
10:: !!!!!!!!!!!!!!
11:: CUSTOMIZE THIS according to your EVC INSTALLED ENVIRONMENT
12:: !!!!!!!!!!!!!!
13
14set OSVERSION=WCE420
15set PLATFORM=STANDARDSDK
16set WCEROOT=C:\Program Files\MSEVC4
17set SDKROOT=C:\Program Files\Microsoft SDKs
18
19:: !!!!!!!!!!!!!!!!!!
20:: END CUSTOMIZATION
21:: !!!!!!!!!!!!!!!!!!
22
23:: Define TARGET CPU
24:: -----------------
25
26:: define "new" target (useful if one wants to compile for various WCE target CPUs)
27if "%1"=="" echo "USAGE : makece TARGETCPU other_make_options..."
28if "%1"=="" echo "TARGETCPU=(ARMV4|ARMV4I|ARMV4T|MIPS16|MIPSII|MIPSII_FP|MIPSIV|MIPSIV_FP|SH3|SH4|X86), other cpu: see bat scripts in evc/bin"
29if "%1"=="" echo "!!! do not hesitate to adapt evc.mak for CPU and/or better compilation flags !!!"
30if "%1"=="" exit /B
31
32:: old code to default to ARMV4, but it is better that users are WARNED that the script now need an explicit target!
33::if "%1"=="" set NEWTGTCPU=ARMV4
34
35if NOT DEFINED TARGETCPU set TARGETCPU=XXXXX
36if NOT "%1"=="" set NEWTGTCPU=%1
37if NOT "%1"=="" shift
38
39echo WCE TARGET CPU is %NEWTGTCPU%
40
41rem Adjust MS EVC env vars
42rem ----------------------
43
44rem Check MSenv vars against our ref values
45
46set isenvok=0
47if "%NEWTGTCPU%"=="%TARGETCPU%"  set /A "isenvok+=1"
48
49if %isenvok%==1 echo WCE ENVIRONMENT OK
50if %isenvok%==1 goto envisok
51
52:: useless since separated tgt folders
53::echo WCE TARGET CPU changed, destroying every obj files
54::del .\*.obj
55
56:: if env is NOT ok, adjust MS EVC env vars to be used by MS WCE<CPU>.BAT
57:: (this is to avoid repetitive pollution of PATH)
58
59echo WCE ENVIRONMENT ADJUSTED
60
61:: call "%WCEROOT%\EVC\WCE420\BIN\WCE%NEWTGTCPU%.BAT"
62call "%WCEROOT%\EVC\%OSVERSION%\bin\WCE%NEWTGTCPU%.BAT"
63
64set TARGETCPU=%NEWTGTCPU%
65
66:envisok
67
68::exit /B
69
70rem make everything
71rem ---------------
72
73nmake /NOLOGO -f evc.mak %1 %2 %3 %4 %5 %6 %7 %8 %9
74