targets.inc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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. /////////////////////////// XCode /////////////////////////////
  91. $c = BuildTarget::add( 'Xcode', // Name
  92. 'buildFiles/Xcode', // Solution output directory
  93. '', // Project output directory (relative to solution)
  94. '../../source/', // Base directory
  95. 'xcode.tpl', // App Project Template
  96. 'xcodeSharedApp.tpl', // Shared App Project Template
  97. 'xcodeLib.tpl', // Lib Project Template
  98. 'xcodeSharedLib.tpl', // Shared Lib Project Template
  99. 'xcodeSafariPlugin.tpl', // Safari Plugin
  100. '.xcodeproj/project.pbxproj' ); // File ext to write the project to
  101. $c->setDelimiters( '[', ']' ); // What delimeters does this template use?
  102. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'm', 'mm' );
  103. $c->setPlatforms( "mac" );
  104. $c->setDontCompilePatterns( "*\.h*", "*win32*", "*\.win\.*", "#/platformWin32/#", "/D3D.*/", "*dsound*" );
  105. ///////////////////////////// Make //////////////////////////////
  106. $c = BuildTarget::add( 'Make', // Name
  107. 'buildFiles/Make', // Solution Output directory
  108. '', // Project Output directory (relative to solution)
  109. '../../source/', // Base directory
  110. 'makeApp.tpl', // App Project Template
  111. 'makeAppShared.tpl', // Shared App Project Template
  112. 'makeLib.tpl', // Lib Project Template
  113. 'makeSo.tpl', // Shared Lib Project Template
  114. '', // NP Plugin
  115. '' ); // File ext to write the project to
  116. $c->setSolutionInfo( 'makeSolution.tpl', '', '' );
  117. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'asm' );
  118. $c->setPlatforms( "linux" );
  119. $c->setDontCompilePatterns( "*\.h*", "*win32*", "*\.win\.*", "/D3D.*/", "*dsound*", "#/mac/#", "#\.mm$#", "#\.m$#", "*\.dedicated\.*" );
  120. ///////////////////////////// Make Dedicated ////////////////////
  121. $c = BuildTarget::add( 'Make Dedicated', // Name
  122. 'buildFiles/Make_Ded', // Output directory
  123. '', // Project Output directory (relative to solution)
  124. '../../source/', // Base directory
  125. 'makeApp.tpl', // App Project Template
  126. 'makeAppShared.tpl', // Shared App Project Template
  127. 'makeLib.tpl', // Lib Project Template
  128. 'makeSo.tpl', // Shared Lib Project Template
  129. '', // NP Plugin
  130. '' ); // File ext to write the project to
  131. $c->setSolutionInfo( 'makeSolution.tpl', '', '' );
  132. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'asm' );
  133. $c->setPlatforms( "linux_dedicated" );
  134. $c->setDontCompilePatterns( "*\.h*", "*win32*", "*\.win\.*", "/D3D.*/", "#/gl/#", "#/mac/#", "#\.mm$#", "#\.m$#", "*\.client\.*" );
  135. ///////////////////////////// Build /////////////////////////////
  136. // 'buildManifest_'.$name.'_'.Generator::$platform.'.txt',
  137. $c = BuildTarget::add( 'build', // Name
  138. 'buildFiles', // Solution output directory
  139. 'projects/', // Project output directory (relative to solution)
  140. '../source/', // Base directory
  141. 'buildManifest.tpl', // App Project Template
  142. 'buildManifest.tpl', // Shared Project Template
  143. '', // Lib Project Template
  144. '', // Shared Lib Project Template
  145. '', // ActiveX Project Template
  146. '.txt' );
  147. $c->setFileExtensions( 'c', 'cc', 'h', 'cpp', 'inl', 'asm', 'm', 'mm' );
  148. // NO PLATFORMS - SO ALL OR NONE?
  149. $c->setPlatforms("");
  150. ////////////////////
  151. function generateAppConfigOutputs( $name )
  152. {
  153. return BuildTarget::getInstances();
  154. }
  155. function generateLibConfigOutputs( $name )
  156. {
  157. return BuildTarget::getInstances();
  158. }
  159. ?>