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.

152 lines
4.2 KiB

  1. //-----------------------------------------------------------------------------
  2. // VSTDLIB.VPC
  3. //
  4. // Project Script
  5. //-----------------------------------------------------------------------------
  6. $Macro SRCDIR ".."
  7. $Macro OUTBINDIR "$SRCDIR\..\game\bin"
  8. $Macro NOSCHEMACOMPILER "1"
  9. $include "$SRCDIR\vpc_scripts\source_dll_base.vpc"
  10. $Configuration
  11. {
  12. $General [$X360]
  13. {
  14. // X360 version publishes to some other directory then copies here so we need to tell VPC to track this
  15. // or else it won't know what depends on this project.
  16. $AdditionalOutputFiles "$LIBPUBLIC\$(TargetName).lib" [$X360]
  17. $GameOutputFile "$OUTBINDIR/$_IMPLIB_DLL_PREFIX$OUTBINNAME$_DLL_EXT"
  18. }
  19. $Compiler
  20. {
  21. $PreprocessorDefinitions "$BASE;VSTDLIB_DLL_EXPORT"
  22. $GCC_ExtraCompilerFlags "-fno-stack-protector" [$OSXALL]
  23. $GCC_ExtraCompilerFlags "-U_FORTIFY_SOURCE -fno-stack-protector" [$LINUXALL]
  24. }
  25. $Linker [!$PS3]
  26. {
  27. $AdditionalDependencies "$BASE odbc32.lib odbccp32.lib" [$WINDOWS]
  28. // 360 publishes the import library via a post build step
  29. $ImportLibrary "$(TargetDir)\$(TargetName).lib" [$X360]
  30. // Everyone but 360 build right to the location.
  31. $ImportLibrary "$LIBPUBLIC\$_IMPLIB_PREFIX$OUTBINNAME$_IMPLIB_EXT" [!$X360]
  32. // 360 will auto generate a def file for this import library
  33. $ModuleDefinitionFile " " [$X360]
  34. $AdditionalOptions "$BASE /AUTODEF:xbox\xbox.def" [$X360]
  35. $SystemFrameworks "CoreServices"
  36. $SystemLibraries "iconv" [$OSXALL]
  37. }
  38. $Linker [$PS3||$POSIX]
  39. {
  40. $ImportLibrary "$LIBPUBLIC\$_IMPLIB_PREFIX$OUTBINNAME$_IMPLIB_EXT"
  41. $AdditionalDependencies "$BASE libl10n_stub.a" [$PS3]
  42. }
  43. $PreLinkEvent [!$POSIX]
  44. {
  45. $CommandLine "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $LIBPUBLIC\$(TargetName).lib $SRCDIR" "\n" \
  46. "$BASE"
  47. }
  48. $PreLinkEvent [$X360]
  49. {
  50. // Run a pre-link event to clean the .def file from the last link
  51. $CommandLine "if exist xbox\xbox.def del xbox\xbox.def" "\n" \
  52. "$BASE"
  53. }
  54. $PreLinkEvent [$PS3]
  55. {
  56. $CommandLine "$BASE"
  57. $Description "NOTE - If PRX linking fails, make sure your vstdlib_staticlib is building in same solution configuration (debug/release) as vstdlib prx."
  58. }
  59. $PostBuildEvent [$X360]
  60. {
  61. // Run a post build event to validate the .def file was correctly generated
  62. $CommandLine "perl $SRCDIR\devtools\bin\make360def.pl -checkauto xbox\xbox.def" "\n" \
  63. "if exist $(TargetDir)$(TargetName).lib copy $(TargetDir)$(TargetName).lib $LIBPUBLIC\$(TargetName).lib" "\n" \
  64. "$BASE"
  65. }
  66. $PostBuildEvent [$PS3]
  67. {
  68. // Publish the import lib
  69. $CommandLine "if exist $(TargetName)_stub.a move $(TargetName)_stub.a $LIBPUBLIC\$(TargetName).lib" "\n" \
  70. "if exist $(TargetName)_verlog.txt del $(TargetName)_verlog.txt" "\n" \
  71. "$BASE" "\n"
  72. }
  73. $General [$POSIX]
  74. {
  75. $GameOutputFile "$OUTBINDIR/$_IMPLIB_DLL_PREFIX$OUTBINNAME$_DLL_EXT"
  76. }
  77. $General [$PS3]
  78. {
  79. $AdditionalProjectDependencies "$BASE;vstdlib_staticlib"
  80. }
  81. }
  82. $Configuration "Release"
  83. {
  84. $PreBuildEvent [$PS3]
  85. {
  86. // Clear potentially stale verlog files
  87. $CommandLine "ppu-lv2-prx-exportpickup -o Release_PS3/prxexport.inl Release_vstdlibstaticlib_PS3/prx.obj Release_vstdlibstaticlib_PS3/random.obj Release_vstdlibstaticlib_PS3/coroutine.obj" "\n" \
  88. "if exist vstdlib_rel_verlog.txt del vstdlib_rel_verlog.txt" "\n" \
  89. "$BASE" "\n"
  90. }
  91. $Linker [$PS3]
  92. {
  93. $AdditionalDependencies "$BASE "Release_vstdlibstaticlib_PS3/vstdlib_staticlib_ps3.lib""
  94. }
  95. }
  96. $Configuration "Debug"
  97. {
  98. $PreBuildEvent [$PS3]
  99. {
  100. // Clear potentially stale verlog files
  101. $CommandLine "ppu-lv2-prx-exportpickup -o Debug_PS3/prxexport.inl Debug_vstdlibstaticlib_PS3/prx.obj Debug_vstdlibstaticlib_PS3/random.obj Debug_vstdlibstaticlib_PS3/coroutine.obj" "\n" \
  102. "if exist vstdlib_dbg_verlog.txt del vstdlib_dbg_verlog.txt" "\n" \
  103. "$BASE" "\n"
  104. }
  105. $Linker [$PS3]
  106. {
  107. $AdditionalDependencies "$BASE "Debug_vstdlibstaticlib_PS3/vstdlib_staticlib_ps3.lib""
  108. }
  109. }
  110. $Include "vstdlib.inc"
  111. $Project
  112. {
  113. $Folder "PS3 Files" [$PS3]
  114. {
  115. $File "prxexport.cpp"
  116. }
  117. $Folder "Source Files"
  118. {
  119. -$File "$SRCDIR\common\ps3\prx.cpp" [$PS3]
  120. }
  121. $folder "Link Libraries"
  122. {
  123. -$ImpLib "$LIBPUBLIC\vstdlib"
  124. }
  125. }
  126. $Project "vstdlib"
  127. {
  128. }