targets.inc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <?php
  2. //-----------------------------------------------------------------------------
  3. // Copyright (c) 2012 GarageGames, LLC
  4. //
  5. // Permission is hereby granted, free of charge, to any person obtaining a copy
  6. // of this software and associated documentation files (the "Software"), to
  7. // deal in the Software without restriction, including without limitation the
  8. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  9. // sell copies of the Software, and to permit persons to whom the Software is
  10. // furnished to do so, subject to the following conditions:
  11. //
  12. // The above copyright notice and this permission notice shall be included in
  13. // all copies or substantial portions of the Software.
  14. //
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  21. // IN THE SOFTWARE.
  22. //-----------------------------------------------------------------------------
  23. ///////////////////////////// VS9 Xenon /////////////////////////////
  24. $c = BuildTarget::add( 'VS9 Xenon', // Name
  25. 'buildFiles/VisualStudio 2008 (XDK)', // Solution output directory
  26. 'projects/', // Project output directory (relative to solution)
  27. '../../source/', // Base directory
  28. 'vc2k8_360_proj.tpl', // App Project Template
  29. 'vc2k8_360_proj.tpl', // Shared App Project Template
  30. 'vc2k8_360_lib_proj.tpl', // Lib Project Template
  31. 'vc2k8_360_dll_proj.tpl', // Shared Lib Project Template
  32. '', // ActiveX Project Template (not supported on 360)
  33. '.vcproj' ); // File ext to write the project to
  34. // Solution template and extension
  35. $c->setSolutionInfo( 'vc2k8_360_sln.tpl', '', '.sln' );
  36. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'm', 'mm' );
  37. $c->setPlatforms( "360" );
  38. $c->setDontCompilePatterns( "#/platformPOSIX.*#", "#/platformMac.*#", "#/platformWin32.*#", "#\.mac\.#", "#\.win32\.#", "#/mac/#", "#/win32/#", "#\.mm$#", "#\.m$#" );
  39. ///////////////////////////// VS9 PS3 /////////////////////////////
  40. $c = BuildTarget::add( 'VS9 PS3', // Name
  41. 'buildFiles/VisualStudio 2008 (PS3)', // Solution output directory
  42. 'projects/', // Project output directory (relative to solution)
  43. '../../source/', // Base directory
  44. 'vc2k8_ps3_proj.tpl', // App Project Template
  45. 'vc2k8_ps3_proj.tpl', // Shared App Project Template
  46. 'vc2k8_ps3_lib_proj.tpl', // Lib Project Template
  47. 'vc2k8_ps3_dll_proj.tpl', // Shared Lib Project Template
  48. '', // ActiveX Project Template (not supported on ps3)
  49. '.vcproj' ); // File ext to write the project to
  50. // Solution template and extension
  51. $c->setSolutionInfo( 'vc2k8_ps3_sln.tpl', '', '.sln' );
  52. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'm', 'mm' );
  53. $c->setPlatforms( "ps3" );
  54. $c->setDontCompilePatterns( "#/platformXbox.*#", "#/platformWin32.*#", "#\.mac\.#", "#\.win\.#", "#\.win32\.#", "#/mac/#", "#/win32/#", "#\.mm$#", "#\.m$#" );
  55. ///////////////////////////// VS9 /////////////////////////////
  56. $c = BuildTarget::add( 'VS9', // Name
  57. 'buildFiles/VisualStudio 2008', // Solution output directory
  58. 'projects/', // Project output directory (relative to solution)
  59. '../../source/', // Base directory
  60. 'vc2k8_proj.tpl', // App Project Template
  61. 'vc2k8_shared.tpl', // Shared App Project Template
  62. 'vc2k8_lib_proj.tpl', // Lib Project Template
  63. 'vc2k8_dll_proj.tpl', // Shared Lib Project Template
  64. 'vc2k8_activex_proj.tpl', // ActiveX Control
  65. '.vcproj' ); // File ext to write the project to
  66. // Solution template and extension
  67. $c->setSolutionInfo( 'vc2k8_sln.tpl', 'vc2k8_proj_user.tpl', '.sln' );
  68. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'asm', 'rc', 'm', 'mm', 'cs' );
  69. $c->setPlatforms( "win", "win32" );
  70. $c->setDotNetInfo('vc2k8_csproj.tpl');
  71. $c->setDontCompilePatterns( "#/platformPOSIX.*#", "#/platformMac.*#", "#\.mac\.#", "#/mac/#", "#\.mm$#", "#\.m$#" );
  72. ///////////////////////////// VS2010 /////////////////////////////
  73. $c = BuildTarget::add( 'VS2010', // Name
  74. 'buildFiles/VisualStudio 2010', // Solution output directory
  75. 'projects/', // Project output directory (relative to solution)
  76. '../../source/', // Base directory
  77. 'vc2010_proj.tpl', // App Project Template
  78. 'vc2010_shared.tpl', // Shared App Project Template
  79. 'vc2010_lib_proj.tpl', // Lib Project Template
  80. 'vc2010_dll_proj.tpl', // Shared Lib Project Template
  81. 'vc2010_activex_proj.tpl', // ActiveX Control
  82. '.vcxproj' ); // File ext to write the project to
  83. // Solution template and extension
  84. $c->setSolutionInfo( 'vc2010_sln.tpl', '', '.sln', 'vc2010_filter.tpl' );
  85. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'asm', 'rc', 'm', 'mm', 'cs' );
  86. $c->setSourceFileExtensions( 'c', 'cc', 'cpp' );
  87. $c->setPlatforms( "win", "win32" );
  88. $c->setDotNetInfo('vc2010_csproj.tpl');
  89. $c->setDontCompilePatterns( "#/platformPOSIX.*#", "#/platformMac.*#", "#\.mac\.#", "#/mac/#", "#\.mm$#", "#\.m$#" );
  90. ///////////////////////////// VS2012 /////////////////////////////
  91. $c = BuildTarget::add( 'VS2012', // Name
  92. 'buildFiles/VisualStudio 2012', // Solution output directory
  93. 'projects/', // Project output directory (relative to solution)
  94. '../../source/', // Base directory
  95. 'vc2012_proj.tpl', // App Project Template
  96. 'vc2012_shared.tpl', // Shared App Project Template
  97. 'vc2012_lib_proj.tpl', // Lib Project Template
  98. 'vc2012_dll_proj.tpl', // Shared Lib Project Template
  99. 'vc2012_activex_proj.tpl', // ActiveX Control
  100. '.vcxproj' ); // File ext to write the project to
  101. // Solution template and extension
  102. $c->setSolutionInfo( 'vc2012_sln.tpl', '', '.sln', 'vc2012_filter.tpl' );
  103. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'asm', 'rc', 'm', 'mm', 'cs' );
  104. $c->setSourceFileExtensions( 'c', 'cc', 'cpp' );
  105. $c->setPlatforms( "win", "win32" );
  106. $c->setDotNetInfo('vc2012_csproj.tpl');
  107. $c->setDontCompilePatterns( "#/platformPOSIX.*#", "#/platformMac.*#", "#\.mac\.#", "#/mac/#", "#\.mm$#", "#\.m$#" );
  108. /////////////////////////// XCode /////////////////////////////
  109. $c = BuildTarget::add( 'Xcode', // Name
  110. 'buildFiles/Xcode', // Solution output directory
  111. '', // Project output directory (relative to solution)
  112. '../../source/', // Base directory
  113. 'xcode.tpl', // App Project Template
  114. 'xcodeSharedApp.tpl', // Shared App Project Template
  115. 'xcodeLib.tpl', // Lib Project Template
  116. 'xcodeSharedLib.tpl', // Shared Lib Project Template
  117. 'xcodeSafariPlugin.tpl', // Safari Plugin
  118. '.xcodeproj/project.pbxproj' ); // File ext to write the project to
  119. $c->setDelimiters( '[', ']' ); // What delimeters does this template use?
  120. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'm', 'mm' );
  121. $c->setPlatforms( "mac" );
  122. $c->setDontCompilePatterns( "*\.h*", "*win32*", "*\.win\.*", "#/platformWin32/#", "/D3D.*/", "*dsound*" );
  123. ///////////////////////////// Make //////////////////////////////
  124. $c = BuildTarget::add( 'Make', // Name
  125. 'buildFiles/Make', // Solution Output directory
  126. '', // Project Output directory (relative to solution)
  127. '../../source/', // Base directory
  128. 'makeApp.tpl', // App Project Template
  129. 'makeAppShared.tpl', // Shared App Project Template
  130. 'makeLib.tpl', // Lib Project Template
  131. 'makeSo.tpl', // Shared Lib Project Template
  132. '', // NP Plugin
  133. '' ); // File ext to write the project to
  134. $c->setSolutionInfo( 'makeSolution.tpl', '', '' );
  135. $c->setFileExtensions( 'c', 'cc', 'cpp', 'asm' );
  136. $c->setPlatforms( "linux" );
  137. $c->setDontCompilePatterns( "*\.h*", "*win32*", "*\.win\.*", "/D3D.*/", "*dsound*", "#/mac/#", "#\.mm$#", "#\.m$#", "*\.dedicated\.*" );
  138. ///////////////////////////// Make Dedicated ////////////////////
  139. $c = BuildTarget::add( 'Make Dedicated', // Name
  140. 'buildFiles/Make_Ded', // Output directory
  141. '', // Project Output directory (relative to solution)
  142. '../../source/', // Base directory
  143. 'makeApp.tpl', // App Project Template
  144. 'makeAppShared.tpl', // Shared App Project Template
  145. 'makeLib.tpl', // Lib Project Template
  146. 'makeSo.tpl', // Shared Lib Project Template
  147. '', // NP Plugin
  148. '' ); // File ext to write the project to
  149. $c->setSolutionInfo( 'makeSolution.tpl', '', '' );
  150. $c->setFileExtensions( 'c', 'cc', 'cpp', 'asm' );
  151. $c->setPlatforms( "linux_dedicated" );
  152. $c->setDontCompilePatterns( "*\.h*", "*win32*", "*\.win\.*", "/D3D.*/", "#/gl/#", "#/mac/#", "#\.mm$#", "#\.m$#", "*\.client\.*" );
  153. ///////////////////////////// Build /////////////////////////////
  154. // 'buildManifest_'.$name.'_'.T3D_Generator::$platform.'.txt',
  155. $c = BuildTarget::add( 'build', // Name
  156. 'buildFiles', // Solution output directory
  157. 'projects/', // Project output directory (relative to solution)
  158. '../source/', // Base directory
  159. 'buildManifest.tpl', // App Project Template
  160. 'buildManifest.tpl', // Shared Project Template
  161. '', // Lib Project Template
  162. '', // Shared Lib Project Template
  163. '', // ActiveX Project Template
  164. '.txt' );
  165. $c->setFileExtensions( 'c', 'cc', 'cpp', 'asm', 'm', 'mm' );
  166. // NO PLATFORMS - SO ALL OR NONE?
  167. $c->setPlatforms("");
  168. ////////////////////
  169. function generateAppConfigOutputs( $name )
  170. {
  171. return BuildTarget::getInstances();
  172. }
  173. function generateLibConfigOutputs( $name )
  174. {
  175. return BuildTarget::getInstances();
  176. }
  177. ?>