Added my Android build files to iphone branch, added #ifdef ANDROID and fixed some missed includes in sources

This commit is contained in:
pelya
2009-11-24 12:19:54 +02:00
parent 3ff5d0c693
commit 6962202361
2079 changed files with 478697 additions and 9 deletions

View File

@@ -0,0 +1,72 @@
setup VC8 for CE:
------------------
- VC8 doesn't have any setup batchfiles that prepare the environment for compiling
with CE. You can take those from eVC4 and adapt them or write your own. This snippet
should get you going:
rem you need to adapt at least these three
set OSVERSION=WCE500
set PLATFORM=MY_OWN_PLATFORM
set TARGETCPU=MIPSII
rem the compiler is always cl.exe, different compilers are in different paths
set CC=cl.exe
rem obviously, these need to be adjusted to where you installed VS2005 and the SDKs
set VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
set SDKROOT=C:\Programme\Windows CE Tools
set PATH=%VSINSTALLDIR%\VC\ce\bin\x86_mips;%VSINSTALLDIR%\VC\bin;%VSINSTALLDIR%\Common7\IDE;%PATH%
set PLATFORMROOT=%SDKROOT%\%OSVERSION%\%PLATFORM%
rem add libs and includes from the SDK
set INCLUDE=%PLATFORMROOT%\include\%TARGETCPU%;%PLATFORMROOT%\MFC\include;%PLATFORMROOT%\ATL\include
set LIB=%PLATFORMROOT%\lib\%TARGETCPU%;%PLATFORMROOT%\MFC\lib\%TARGETCPU%;%PLATFORMROOT%\ATL\lib\%TARGETCPU%
rem add libs that came with VC8
rem Note: there are more libs and includes under ce\atlmfc, not sure if these are needed.
set LIB=%LIB%;%VSINSTALLDIR%\VC\ce\lib\%TARGETCPU%
You should now be able to run cl.exe for the target you expected.
- The cross compilers of VC8 are the same version as for the native target, i.e. MSC14.
- The cross compiler for MIPS has the same bug as mentioned in doc/README.evc4 and
the same workaround applies. However, using 'whole program optimization', it results
in an error in the link phase.
- In order for STLport to recognize which target you are compiling for, you need to have
some macros defined, e.g. for the target architecture. The compilers do that partially on
their own, but not sufficiently. Therefore, STLport requires these defines:
-- These are generally set for CE:
_UNICODE;UNICODE;_WIN32;WIN32;UNDER_CE;WINCE;
-- This one uses an environment variable to set the CE version:
_WIN32_WCE=$(CEVER);
-- These are used to help STLport recognise the target architecture:
$(ARCHFAM);$(_ARCHFAM_);$(INSTRUCTIONSET)
Note that the instructionset is not strictly needed for x86 but definitely for ARM. It
doesn't hurt for x86 though, so I'd always set these in any new project.
-- For release builds:
NDEBUG;
-- For debug builds:
DEBUG;_DEBUG;
-- For debug builds with additional STLport diagnostics:
DEBUG;_DEBUG;_STLP_DEBUG;
-- For MFC applications:
_AFXDLL;
- Further settings:
Code generation: Multithreaded [Debug] DLL
Language: enable RTTI
Optimization: maximise speed and enable whole program optimization for release builds
- Linker settings:
Ignore specific libraries: libc.lib;libcd.lib
Commandline: /SUBSYSTEM:WINDOWSCE
Optimisation: /LTCG for release builds
- Resource compiler:
Define: UNDER_CE;WINCE;_WIN32_WCE=$(CEVER)