diff --git a/Jamfile.in b/Jamfile.in index 287ed9b56..bce24b92c 100644 --- a/Jamfile.in +++ b/Jamfile.in @@ -42,8 +42,10 @@ MsvcGenSubDir TOP msvc 7 : 7 ; MsvcGenSubDir TOP msvc 71 : 71 ; MsvcGenSubDir TOP msvc sn71 : sn71 ; MsvcGenSubDir TOP msvc 8 : 8 ; +MsvcGenSubDir TOP msvc xenon8 : xenon8 ; MsvcGenTemplateDir TOP mk msvcgen ; -MsvcGenWorkspace bullet ; +MsvcGenWorkspace bullet : : "grp.+_(?!bullet$)" ; +MsvcGenWorkspace bullet_corelib : libbulletcollision libbulletdynamics libbulletmath libbulletmultithreaded : "grp.+_(?!bullet_corelib$)" ; # Set project-specific compiler and linker options for msvcgen. MsvcGenConfig GL.AVAILABLE : yes ; diff --git a/mk/jam/msvcgen.jam b/mk/jam/msvcgen.jam index 61706067d..68aa2c63d 100644 --- a/mk/jam/msvcgen.jam +++ b/mk/jam/msvcgen.jam @@ -41,7 +41,7 @@ # #============================================================================== -MSVCGEN_SUPPORTED_VERSIONS = 6 7 71 8 sn71 ; +MSVCGEN_SUPPORTED_VERSIONS = 6 7 71 8 sn71 xenon8 ; MSVCGEN_BUILD_ROOT ?= [ ConcatDirs $(BUILDTOP) out ] ; MSVCGEN_BUILD_TEMP ?= [ ConcatDirs $(MSVCGEN_BUILD_ROOT) msvcgen ] ; @@ -435,6 +435,7 @@ MSVCGEN_STRIP_ROOT = $(MSVCGEN_BUILD_ROOT)/ $(TOP)/ ; # of protecting only "." since it arises frequently.) MSVCGEN_SED_PROTECT = "$(SED) 's:\\.:\\\\\\.:g'" ; +MSVC_PLATFORM_SUFFIX = ; MSVC_VERSION ?= 7 ; if $(MSVC_VERSION) = 6 { @@ -445,13 +446,14 @@ if $(MSVC_VERSION) = 6 MSVC_FORCE_CRLF = yes ; MSVC_TEMPLATE_SUFFIX = 6 ; } -else if $(MSVC_VERSION) = 7 || $(MSVC_VERSION) = 71 || $(MSVC_VERSION) = 8 || $(MSVC_VERSION) = sn71 +else if $(MSVC_VERSION) = 7 || $(MSVC_VERSION) = 71 || $(MSVC_VERSION) = 8 || $(MSVC_VERSION) = sn71 || $(MSVC_VERSION) = xenon8 { SUFPRJ = vcproj ; SUFWSP = sln ; MSVC_SUFLIB = liiixxiib ; MSVC_SUFEXE = exe ; - + + MSVC_FORCE_CRLF = no ; MSVC_TEMPLATE_SUFFIX = 7 ; if $(MSVC_VERSION) = 7 @@ -477,6 +479,13 @@ else if $(MSVC_VERSION) = 7 || $(MSVC_VERSION) = 71 || $(MSVC_VERSION) = 8 || $( MSVC_SUFLIB = a ; MSVC_SUFEXE = elf ; } + else if $(MSVC_VERSION) = xenon8 + { + MSVC_FORMATVERSION_PRJ = 8.00 ; + MSVC_FORMATVERSION_WSP = 9.00 ; + MSVC_TEMPLATE_SUFFIX = xenon8 ; + MSVC_PLATFORM_SUFFIX = _xenon_ ; + } } else { @@ -732,6 +741,7 @@ rule MsvcProject "librarydelay|$(MSVC.LIBRARY_DELAY.$(type))" "msvcversion|$(MSVC_VERSION)" "static|$($(rawname)_STATIC)" + "platformsuffix|$(MSVC_PLATFORM_SUFFIX)" $(MSVCGEN_VARIABLES) : notfile : $(respdir) ; MsvcRmTemps msvcgen : $(respfile) ; diff --git a/mk/msvcgen/projectx7.tlib b/mk/msvcgen/projectx7.tlib index 7d3434009..ceb112c35 100644 --- a/mk/msvcgen/projectx7.tlib +++ b/mk/msvcgen/projectx7.tlib @@ -102,7 +102,7 @@ [% END %] [% MACRO linker_common BLOCK -%] - OutputFile="[% path([my.doc.buildroot.0, my.doc.target.0]) %]" + OutputFile="[% path([my.doc.buildroot.0, glue([my.doc.target.0, my.doc.platformsuffix.0])]) %]" [% END %] [% MACRO linker_app_release(subsys) BLOCK -%] @@ -138,8 +138,11 @@ [% END %] [% MACRO library_outfile(suffix) BLOCK -%] - OutputFile="[% worklibout %]\[% my.doc.project.0 %][% suffix %].lib" + OutputFile="[% worklibout %]\[% my.doc.project.0 %][% my.doc.platformsuffix.0 %][% suffix %].lib" [% END %] [% MACRO librarian_library_release GET library_outfile('') %] [% MACRO librarian_library_debug GET library_outfile('_d') %] [% MACRO librarian_group GET library_outfile('') %] +[% MACRO postbuild_library BLOCK -%] + CommandLine="xcopy /r /y $(TARGETPATH) $(PROJECTDIR)..\..\lib\" +[% END %] diff --git a/mk/msvcgen/projectxenon8.tlib b/mk/msvcgen/projectxenon8.tlib new file mode 100644 index 000000000..5d2fbd3bc --- /dev/null +++ b/mk/msvcgen/projectxenon8.tlib @@ -0,0 +1,147 @@ +[% FILTER null; +#============================================================================== +# TemplateToolkit2 template for MSVC7 project (vcproj) file. +# Copyright (C) 2004 by Eric Sunshine +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This library is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public +# License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this library; if not, write to the Free Software Foundation, +# Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +#============================================================================== + PROCESS macros.tlib; + PROCESS control.tlib; + PROCESS projectx7.tlib; + + MACRO composedefs(defs) GET compose('defines', defs, ';'); + MACRO composedirs(tag, seed) GET composepaths(${"build.${tag}key"},seed,';'); + + my = {}; + load(respfile, 'doc'); + FOREACH f IN my.doc.customize; PROCESS $f | null; END; + + files = striproots(filter(my.doc.file).split('\|')).split('\|').sort; +END -%] + + + + + + +[% FOREACH build IN builds -%] + + + + + + + + + + + + + +[% END -%] + + + [%- FOREACH group IN groups %] + [%- items = files.grep(group.types) %] + [%- IF items.size > 0 %] + + [%- FOREACH file IN items %] + + [%- IF my.doc.static %] + [%- UNLESS file.match('\\.(h|hpp|rc)$') %] + [%- FOREACH build IN builds %] + + + + [%- END %] + [%- END %] + [%- END %] + + [%- END %] + + [%- END %] + [%- END %] + + + + diff --git a/mk/msvcgen/workspacexenon8.tlib b/mk/msvcgen/workspacexenon8.tlib new file mode 100644 index 000000000..7ebafff48 --- /dev/null +++ b/mk/msvcgen/workspacexenon8.tlib @@ -0,0 +1,66 @@ +[% FILTER null; +#============================================================================== +# TemplateToolkit2 template for MSVC7 solution (sln) file. +# Copyright (C) 2004 by Eric Sunshine +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This library is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public +# License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this library; if not, write to the Free Software Foundation, +# Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +#============================================================================== + PROCESS macros.tlib; + PROCESS control.tlib; + + my = {}; + load(respfile, 'doc'); + FOREACH f IN my.doc.customize; PROCESS $f | null; END; + + projects = filter(my.doc.project).split('\|').sort; + guids = {}; + FOREACH project IN projects; + guids.$project = guid(project); + END; +END -%] +Microsoft Visual Studio Solution File, Format Version [% my.doc.formatversion.0 %] +# Visual C++ Express 2005 +[% FOREACH project IN projects -%] +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "[% project %]", " + [%- project %].vcproj", "{[% guids.$project %]}" +EndProject +[% END -%] +Global + GlobalSection(SolutionConfiguration) = preSolution +[% n = 0; FOREACH build IN builds -%] + ConfigName.[% n; n = n + 1 %] = [% build.name %] +[% END -%] + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution +[% FOREACH project IN projects; g = guids.$project; n = 0 -%] +[% FOREACH dep IN filter(my.doc.$project).split('\|').sort -%] + {[% g %]}.[% n; n = n + 1 %] = {[% guids.$dep %]} +[% END -%] +[% END -%] + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution +[% FOREACH project IN projects; g = guids.$project -%] +[% FOREACH build IN builds -%] + {[% g %]}.[% build.name %].ActiveCfg = [% build.name %]|Xbox 360 + {[% g %]}.[% build.name %].Build.0 = [% build.name %]|Xbox 360 +[% END -%] +[% END -%] + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/src/LinearMath/btQuickprof.h b/src/LinearMath/btQuickprof.h index 9ad8ba012..a885967c5 100644 --- a/src/LinearMath/btQuickprof.h +++ b/src/LinearMath/btQuickprof.h @@ -49,8 +49,13 @@ typedef uint64_t __int64; #define NOWINRES #define NOMCX #define NOIME +#ifdef _XBOX + #include +#else #include +#endif #include + #else #include #endif @@ -704,3 +709,4 @@ std::string btProfiler::createStatsString(BlockTimingMethod method) #endif //QUICK_PROF_H + diff --git a/src/LinearMath/btScalar.h b/src/LinearMath/btScalar.h index 222315c1c..9a430ce75 100644 --- a/src/LinearMath/btScalar.h +++ b/src/LinearMath/btScalar.h @@ -35,6 +35,11 @@ subject to the following restrictions: #pragma warning(disable:4786) #define SIMD_FORCE_INLINE __forceinline #define ATTRIBUTE_ALIGNED16(a) __declspec(align(16)) a + #ifdef _XBOX + #define BT_USE_VMX128 + #else + #define BT_USE_SSE + #endif #endif //__MINGW32__ #include