Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

190 lines
5.4 KiB

  1. //-----------------------------------------------------------------------------
  2. // TIER0.VPC
  3. //
  4. // Project Script
  5. //-----------------------------------------------------------------------------
  6. $Macro SRCDIR ".."
  7. $Macro OUTBINDIR "$SRCDIR\..\game\bin"
  8. $Macro NOSCHEMACOMPILER "1"
  9. $Conditional VTUNE_ENABLED 0
  10. $Include "$SRCDIR\vpc_scripts\source_dll_base.vpc"
  11. //-----------------------------------------------------------------------------
  12. // VTune defines
  13. $Macro VTUNE_DIR "$SRCDIR\thirdparty\vtune"
  14. $Macro VTUNE_INCLUDE "$VTUNE_DIR\include"
  15. $Macro VTUNE_LIB "$VTUNE_DIR\lib32\libittnotify.lib"
  16. //-----------------------------------------------------------------------------
  17. $Configuration
  18. {
  19. $General [$X360]
  20. {
  21. // X360 version publishes to some other directory then copies here so we need to tell VPC to track this
  22. // or else it won't know what depends on this project.
  23. $AdditionalOutputFiles "$LIBPUBLIC\$(TargetName).lib"
  24. }
  25. $Compiler
  26. {
  27. $PreprocessorDefinitions "$BASE;TIER0_DLL_EXPORT;CROSS_PLATFORM_VERSION=1;THREAD_MUTEX_TRACING_ENABLED"[$WINDOWS||$X360]
  28. $PreprocessorDefinitions "$BASE;TIER0_DLL_EXPORT;CROSS_PLATFORM_VERSION=1;POSIX" [$PS3||$POSIX]
  29. $PreprocessorDefinitions "$BASE;TIER0_FPO_DISABLED" [$NOFPO]
  30. }
  31. $Compiler [$WINDOWS]
  32. {
  33. $AdditionalIncludeDirectories "$BASE;$VTUNE_INCLUDE" [$VTUNE_ENABLED]
  34. }
  35. $Linker [$WINDOWS]
  36. {
  37. $AdditionalDependencies "$BASE;$VTUNE_LIB" [$VTUNE_ENABLED]
  38. }
  39. $Compiler [$PS3]
  40. {
  41. $AdditionalIncludeDirectories "$BASE;"$(SN_PS3_PATH)/ppu/include""
  42. $PreprocessorDefinitions "$BASE;PLATFORM_OVERRIDE_TIER0"
  43. }
  44. $SNCCompiler [$PS3]
  45. {
  46. $ForceIncludes "platform_override.h"
  47. }
  48. $Linker [$X360]
  49. {
  50. // 360 publishes the import library via a post build step
  51. $ImportLibrary "$(TargetDir)\$(TargetName).lib"
  52. // 360 will auto generate a def file for this import library
  53. $ModuleDefinitionFile " "
  54. $AdditionalOptions "$BASE /AUTODEF:xbox\xbox.def"
  55. }
  56. $Linker [!$X360]
  57. {
  58. // Everyone but 360 build right to the location.
  59. $ImportLibrary "$LIBPUBLIC\$_IMPLIB_PREFIX$OUTBINNAME$_IMPLIB_EXT"
  60. }
  61. $Linker [$PS3]
  62. {
  63. $AdditionalDependencies "$BASE "$(SN_PS3_PATH)/ppu/lib/sn/libsn.a" "$(SN_PS3_PATH)/ppu/lib/sn/libsntuner.a""
  64. }
  65. $Linker
  66. {
  67. $AdditionalDependencies "$BASE ws2_32.lib" [$WINDOWS]
  68. }
  69. $PreLinkEvent [!$POSIX]
  70. {
  71. $CommandLine "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $LIBPUBLIC\$(TargetName).lib $SRCDIR" "\n" \
  72. "$BASE"
  73. }
  74. $PreLinkEvent [$X360]
  75. {
  76. // Run a pre-link event to clean the .def file from the last link
  77. $CommandLine "if exist xbox\xbox.def del xbox\xbox.def" "\n" \
  78. "$BASE"
  79. }
  80. $PreLinkEvent [$PS3]
  81. {
  82. $CommandLine "$BASE"
  83. $Description "NOTE - If PRX linking fails, make sure your tier0_staticlib is building in same solution configuration (debug/release) as tier0 prx."
  84. }
  85. $PostBuildEvent [$X360]
  86. {
  87. // Publish the import lib
  88. $CommandLine "if exist $(TargetDir)$(TargetName).lib copy $(TargetDir)$(TargetName).lib $LIBPUBLIC\$(TargetName).lib" "\n" \
  89. "$BASE"
  90. }
  91. $PostBuildEvent [$PS3]
  92. {
  93. // Publish the import lib
  94. $CommandLine "if exist $(TargetName)_stub.a move $(TargetName)_stub.a $LIBPUBLIC\$(TargetName).lib" "\n" \
  95. "if exist $(TargetName)_verlog.txt del $(TargetName)_verlog.txt" "\n" \
  96. "$BASE" "\n"
  97. }
  98. $General [$POSIX]
  99. {
  100. $GameOutputFile "$OUTBINDIR/$_IMPLIB_PREFIX$OUTBINNAME$_DLL_EXT"
  101. }
  102. $General [$PS3]
  103. {
  104. $AdditionalProjectDependencies "$BASE;tier0_staticlib"
  105. }
  106. }
  107. $Configuration "Release"
  108. {
  109. $PreBuildEvent [$PS3]
  110. {
  111. // Clear potentially stale verlog files
  112. $CommandLine "ppu-lv2-prx-exportpickup -o Release_PS3/prxexport.inl Release_tier0staticlib_PS3/prx.obj Release_tier0staticlib_PS3/threadtools.obj Release_tier0staticlib_PS3/vprof.obj Release_tier0staticlib_PS3/dbg.obj Release_tier0staticlib_PS3/logging.obj" "\n" \
  113. "if exist tier0_rel_verlog.txt del tier0_rel_verlog.txt" "\n" \
  114. "$BASE" "\n"
  115. }
  116. $Linker [$PS3]
  117. {
  118. $AdditionalDependencies "$BASE "Release_tier0staticlib_PS3/tier0_staticlib_ps3.lib""
  119. }
  120. }
  121. $Configuration "Debug"
  122. {
  123. $PreBuildEvent [$PS3]
  124. {
  125. // Clear potentially stale verlog files
  126. $CommandLine "ppu-lv2-prx-exportpickup -o Debug_PS3/prxexport.inl Debug_tier0staticlib_PS3/prx.obj Debug_tier0staticlib_PS3/threadtools.obj Debug_tier0staticlib_PS3/vprof.obj Debug_tier0staticlib_PS3/dbg.obj Debug_tier0staticlib_PS3/logging.obj" "\n" \
  127. "if exist tier0_dbg_verlog.txt del tier0_dbg_verlog.txt" "\n" \
  128. "$BASE" "\n"
  129. }
  130. $Linker [$PS3]
  131. {
  132. $AdditionalDependencies "$BASE "Debug_tier0staticlib_PS3/tier0_staticlib_ps3.lib""
  133. }
  134. }
  135. $Include "tier0.inc"
  136. $Project
  137. {
  138. $Folder "PS3 Files" [$PS3]
  139. {
  140. $File "prxexport.cpp"
  141. }
  142. $Folder "Source Files" [$PS3]
  143. {
  144. -$File "$SRCDIR\common\ps3\prx.cpp"
  145. }
  146. $Folder "Link Libraries"
  147. {
  148. -$ImpLib "$LIBPUBLIC\tier0"
  149. -$Lib "$LIBPUBLIC\tier1"
  150. -$implib "$LIBPUBLIC\vstdlib"
  151. -$Lib "$LIBPUBLIC\interfaces"
  152. $LibExternal "$SRCDIR\thirdparty\telemetry\lib\telemetry32.link" [$WIN32 && !$RAD_TELEMETRY_DISABLED]
  153. $LibExternal "$SRCDIR\thirdparty\telemetry\lib\telemetry64.link" [$WIN64 && !$RAD_TELEMETRY_DISABLED]
  154. $LibExternal "$SRCDIR/thirdparty/telemetry/lib/libtelemetryx86.link" [$LINUX32 && !$RAD_TELEMETRY_DISABLED]
  155. $LibExternal "$SRCDIR/thirdparty/telemetry/lib/libtelemetryx64.link" [$LINUX64 && !$RAD_TELEMETRY_DISABLED]
  156. }
  157. }
  158. $Project "tier0"
  159. {
  160. }