From 2dec6dd505897498b8ea50043190961159f0b407 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Thu, 15 Jul 2010 09:29:32 +0000 Subject: tests: Added Xbox360 and PS3 toolset support git-svn-id: http://pugixml.googlecode.com/svn/trunk@602 99668b35-9821-0410-8761-19e4c4f06640 --- Jamrules.jam | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 143 insertions(+), 6 deletions(-) (limited to 'Jamrules.jam') diff --git a/Jamrules.jam b/Jamrules.jam index 202d583..e3a76ce 100644 --- a/Jamrules.jam +++ b/Jamrules.jam @@ -411,6 +411,130 @@ else if ( $(toolset:I=^suncc) ) sunCC $(>) -o $(<) $(LDFLAGS) } } +else if ( $(toolset:I=^xbox360) ) +{ + rule GetCFlags CONFIG : DEFINES + { + local RESULT = /D$(DEFINES) ; + + if ( $(CONFIG) = "debug" ) + { + RESULT += /D_DEBUG /MTd ; + } + else + { + RESULT += /DNDEBUG /Ox /MT ; + } + + RESULT += /W4 ; + + if ( ! ( PUGIXML_NO_EXCEPTIONS in $(DEFINES) ) ) + { + RESULT += /EHsc ; + } + else + { + RESULT += /D_HAS_EXCEPTIONS=0 ; + } + + return $(RESULT) ; + } + + actions ObjectAction + { + "%XEDK%\bin\win32\cl.exe" /WX /I"%XEDK%\include\xbox" /c $(>) /Fo$(<) /nologo $(CCFLAGS) + } + + actions LibraryAction + { + "%XEDK%\bin\win32\lib.exe" /NOLOGO /OUT:$(<) $(>) + } + + actions LinkAction + { + "%XEDK%\bin\win32\link.exe" /NOLOGO /OUT:$(<) /PDB:$(<:S=.pdb) $(>) /LIBPATH:"%XEDK%\lib\xbox" $(LDFLAGS) + } +} +else if ( $(toolset:I=^ps3_gcc) ) +{ + rule GetCFlags CONFIG : DEFINES + { + local RESULT = -D$(DEFINES) ; + + RESULT += -W -Wall -Wextra -Werror ; + + if ( $(CONFIG) = "debug" ) + { + RESULT += -D_DEBUG ; + } + else + { + RESULT += -DNDEBUG -O3 ; + } + + if ( PUGIXML_NO_EXCEPTIONS in $(DEFINES) ) + { + RESULT += -fno-exceptions ; + } + + return $(RESULT) ; + } + + actions ObjectAction + { + "%SCE_PS3_ROOT%\host-win32\ppu\bin\ppu-lv2-gcc" -c $(>) -o $(<) $(CCFLAGS) + } + + actions LibraryAction + { + "%SCE_PS3_ROOT%\host-win32\ppu\bin\ppu-lv2-ar" rcs $(<) $(>) + } + + actions LinkAction + { + "%SCE_PS3_ROOT%\host-win32\ppu\bin\ppu-lv2-g++" $(>) -o $(<) $(LDFLAGS) + } +} +else if ( $(toolset:I=^ps3_snc) ) +{ + rule GetCFlags CONFIG : DEFINES + { + local RESULT = -D$(DEFINES) ; + + RESULT += -Werror -Xuninitwarn=0 ; + + if ( $(CONFIG) = "debug" ) + { + RESULT += -D_DEBUG ; + } + else + { + RESULT += -DNDEBUG -O3 ; + } + + if ! ( PUGIXML_NO_EXCEPTIONS in $(DEFINES) ) + { + RESULT += -Xc+=exceptions ; + } + + return $(RESULT) ; + } + + actions ObjectAction + { + "%SCE_PS3_ROOT%\host-win32\sn\bin\ps3ppusnc" -c $(>) -o $(<) $(CCFLAGS) + } + + actions LibraryAction + { + "%SCE_PS3_ROOT%\host-win32\sn\bin\ps3snarl" rcs $(<) $(>) + } + + actions LinkAction + { + "%SCE_PS3_ROOT%\host-win32\sn\bin\ps3ppuld" $(>) -o $(<) $(LDFLAGS) + } +} else { exit "Unknown toolset $(toolset)!" ; @@ -459,15 +583,28 @@ if ( $(UNIX) ) } else { - actions screenoutput RunAction + if ( $(toolset:I=^(xbox360|ps3)) ) { - $(>:\\) - } + actions RunAction + { + } - actions RunSampleAction + actions RunSampleAction + { + } + } + else { - cd docs\samples - ..\..\$(>:\\) + actions screenoutput RunAction + { + $(>:\\) + } + + actions RunSampleAction + { + cd docs\samples + ..\..\$(>:\\) + } } actions quietly ignore MakeDirAction -- cgit v1.2.3