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.

328 lines
11 KiB

  1. //-----------------------------------------------------------------------------
  2. // MATERIALSYSTEM.VPC
  3. //
  4. // Project Script
  5. //-----------------------------------------------------------------------------
  6. $macro SRCDIR ".."
  7. $Macro SHADERAPIDX9DIR "shaderapidx9"
  8. $Macro SHADERLIBDIR "shaderlib"
  9. $Macro STDSHADERSDIR "stdshaders"
  10. $Macro OUTBINDIR "$SRCDIR\..\game\bin"
  11. $include "$SRCDIR\vpc_scripts\source_dll_base.vpc"
  12. $IgnoreRedundancyWarning "ON"
  13. //-----------------------------------------------------------------------------
  14. $CustomBuildStep "fp"
  15. {
  16. $CommandLine "$(SCE_PS3_ROOT)\host-win32\Cg\bin\sce-cgc -quiet -profile sce_fp_rsx -o "$(InputName).fpo" "$(InputPath)"
$(SCE_PS3_ROOT)\host-win32\ppu\bin\ppu-lv2-objcopy -I binary -O elf64-powerpc-celloslv2 -B powerpc "$(InputName).fpo" "$(IntDir)\$(InputName).fp.ppu.o""
  17. $Description "Fragment Program $(InputFileName) produces $(InputName).fpo produces $(InputName).fp.ppu.o"
  18. $Outputs "$(IntDir)\$(InputName).fp.ppu.o"
  19. }
  20. $CustomBuildStep "vp"
  21. {
  22. $CommandLine "$(SCE_PS3_ROOT)\host-win32\Cg\bin\sce-cgc -quiet -profile sce_vp_rsx -o "$(InputName).vpo" "$(InputPath)"
$(SCE_PS3_ROOT)\host-win32\ppu\bin\ppu-lv2-objcopy -I binary -O elf64-powerpc-celloslv2 -B powerpc "$(InputName).vpo" "$(IntDir)\$(InputName).vp.ppu.o""
  23. $Description "Vertex Program $(InputFileName) produces $(InputName).vpo produces $(InputName).vp.ppu.o"
  24. $Outputs "$(IntDir)\$(InputName).vp.ppu.o"
  25. }
  26. $Configuration
  27. {
  28. $Compiler
  29. {
  30. $AdditionalIncludeDirectories "$BASE;$SRCDIR\materialsystem"
  31. $AdditionalIncludeDirectories "$BASE;$SRCDIR\dx9sdk\Include" [$WINDOWS && !$GL]
  32. $AdditionalIncludeDirectories "$BASE;$(XEDK)\include\xbox" [$X360]
  33. $PreprocessorDefinitions "$BASE;DEFINE_MATERIALSYSTEM_INTERFACE;MATERIALSYSTEM_EXPORTS;PROTECTED_THINGS_ENABLE;INCLUDE_SCALEFORM"
  34. $PreprocessorDefinitions "$BASE;VERSION_SAFE_STEAM_API_INTERFACES"
  35. $PreprocessorDefinitions "$BASE;USE_ACTUAL_DX" [ ( $WINDOWS || $X360 ) && !$GL ]
  36. $PreprocessorDefinitions "$BASE;GL_GLEXT_PROTOTYPES;DX_TO_GL_ABSTRACTION" [$GL]
  37. $PreprocessorDefinitions "$BASE;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead" [!$POSIX]
  38. $PreprocessorDefinitions "$BASE;ALLOW_TEXT_MODE=1" [$CSTRIKE_TRUNK_BUILD||$CSTRIKE_STAGING_BUILD]
  39. $EnableC++Exceptions "Yes (/EHsc)"
  40. $Create/UsePCHThroughFile "pch_materialsystem.h"
  41. }
  42. $Linker
  43. {
  44. $AdditionalLibraryDirectories "$BASE;$SRCDIR\dx9sdk\lib" [$WINDOWS && !$GL]
  45. $AdditionalDependencies "$BASE winmm.lib Ws2_32.lib imm32.lib oleaut32.lib" [$WINDOWS]
  46. $AdditionalDependencies "$BASE dxguid.lib d3d9.lib" [$WINDOWS && !$GL]
  47. $AdditionalLibraryDirectories "$BASE;$(XEDK)\lib\xbox" [$X360]
  48. $AdditionalDependencies "$BASE libgfx.lib libjpeg.lib zlib.lib libpng.lib" [$X360]
  49. }
  50. $PreLinkEvent [$PS3]
  51. {
  52. $CommandLine "call .\$(IntDir)\xy16icf32.vp.bat" "\n" \
  53. "call .\$(IntDir)\cxformgauraud.fp.bat" "\n" \
  54. "call .\$(IntDir)\cxformgauraudnoaddalpha.fp.bat" "\n" \
  55. "call .\$(IntDir)\cxformgauraudtexture.fp.bat" "\n" \
  56. "call .\$(IntDir)\glyph.vp.bat" "\n" \
  57. "call .\$(IntDir)\noninteractiveshader.fp.bat" "\n" \
  58. "call .\$(IntDir)\noninteractiveshader.vp.bat" "\n" \
  59. "call .\$(IntDir)\noninteractiveshaderstartup.fp.bat" "\n" \
  60. "call .\$(IntDir)\noninteractiveshaderstartuppass2.fp.bat" "\n" \
  61. "call .\$(IntDir)\solidcolor.fp.bat" "\n" \
  62. "call .\$(IntDir)\strip.vp.bat" "\n" \
  63. "call .\$(IntDir)\texttexturealpha.fp.bat" "\n" \
  64. "call .\$(IntDir)\xy16ic32.vp.bat"
  65. }
  66. // Since other shader modules are conglomerated here,
  67. // need to set project settings for those modules too:
  68. $Compiler [$PS3 || $OSXALL]
  69. {
  70. $AdditionalIncludeDirectories "$BASE;..\"
  71. // shaderapidx9
  72. $PreprocessorDefinitions "$BASE;SHADERAPIDX9;SHADER_DLL_EXPORT;"
  73. // shaderlib
  74. $PreprocessorDefinitions "$BASE;FAST_MATERIALVAR_ACCESS;"
  75. // stdshader
  76. $AdditionalIncludeDirectories "$BASE;$SRCDIR\materialsystem\stdshaders\fxctmp9_ps3" [$PS3]
  77. $AdditionalIncludeDirectories "$BASE;$SRCDIR\materialsystem\stdshaders\fxctmp9;$SRCDIR\materialsystem\stdshaders\vshtmp9" [$OSXALL]
  78. $PreprocessorDefinitions "$BASE;STDSHADER_DX9_DLL_EXPORT;FAST_MATERIALVAR_ACCESS"
  79. // all internal headers access
  80. $PreprocessorDefinitions "$BASE;MATSYS_INTERNAL" [$PS3]
  81. // platform override
  82. $PreprocessorDefinitions "$BASE;PLATFORM_OVERRIDE_MATERIALSYSTEM"
  83. }
  84. $SNCCompiler [$PS3]
  85. {
  86. $ForceIncludes "platform_override.h"
  87. }
  88. $Linker [$PS3]
  89. {
  90. $AdditionalDependencies "$BASE libgfx.a libjpeg.a libpng.a libz.a libnet_stub.a libnetctl_stub.a librtc_stub.a"
  91. $AdditionalDependencies "$BASE libfont_stub.a libfontFT_stub.a libfreetypeTT_stub.a"
  92. $AdditionalDependencies "$BASE libgcm_sys_stub.a libgcm_cmdasm.a libsysutil_stub.a libresc_stub.a libspurs_stub.a $SCE_PPU_LIBROOT\libio_stub.a libedgepost.a"
  93. $AdditionalDependencies "$BASE libgem_stub.a"
  94. }
  95. }
  96. $Configuration "Debug"
  97. {
  98. $Compiler [$PS3]
  99. {
  100. // $PreprocessorDefinitions "$BASE;CELL_GCM_DEBUG"
  101. }
  102. $Linker [$WINDOWS]
  103. {
  104. $AdditionalDependencies "$BASE"
  105. $AdditionalDependencies "$BASE d3dx9d.lib" [!$GL]
  106. }
  107. $Linker [$X360]
  108. {
  109. $AdditionalDependencies "$BASE d3dx9d.lib xonlined.lib"
  110. }
  111. $Linker [$PS3]
  112. {
  113. // use libgcm_cmddbg.a to validate parameters
  114. $AdditionalDependencies "$BASE libgcm_cmd.a"
  115. }
  116. }
  117. $Configuration "Release"
  118. {
  119. $Linker [$WINDOWS]
  120. {
  121. $AdditionalDependencies "$BASE"
  122. $AdditionalDependencies "$BASE d3dx9.lib" [!$GL]
  123. }
  124. $Linker [$X360]
  125. {
  126. $AdditionalDependencies "$BASE d3dx9.lib xonline.lib"
  127. }
  128. $Linker [$PS3]
  129. {
  130. $AdditionalDependencies "$BASE libgcm_cmd.a"
  131. }
  132. }
  133. $Configuration
  134. {
  135. $Linker [$OSXALL]
  136. {
  137. $SystemFrameworks "Carbon;OpenGL;Quartz;Cocoa;IOKit"
  138. $SystemLibraries "iconv;z"
  139. }
  140. }
  141. ///////////////////////////////////////////////
  142. //
  143. // PS3 conglomerates all shader modules here
  144. //
  145. $include "shaderapidx9/shaderapidx9_inc.vpc" [$PS3 || $OSXALL]
  146. $include "shaderlib/shaderlib_inc.vpc" [$PS3 || $OSXALL]
  147. $include "stdshaders/stdshader_dx9_inc.vpc" [$PS3 || $OSXALL]
  148. //
  149. //
  150. ///////////////////////////////////////////////
  151. $Project "materialsystem"
  152. {
  153. $Folder "Source Files"
  154. {
  155. $File "CColorCorrection.cpp"
  156. $File "cmaterial.cpp"
  157. $File "cmaterial_queuefriendly.cpp"
  158. $File "CMaterialSubRect.cpp"
  159. $File "cmaterialvar.cpp"
  160. $File "cmatnullrendercontext.cpp"
  161. $File "colorspace.cpp"
  162. $File "ctexture.cpp"
  163. $File "$SRCDIR\public\filesystem_helpers.cpp"
  164. $File "imagepacker.cpp"
  165. $File "mat_stub.cpp"
  166. $File "materialsystem_global.cpp"
  167. $File "morph.cpp"
  168. $File "SubdMgr.cpp" [ !$X360 && !$PS3 ]
  169. $File "occlusionquerymgr.cpp"
  170. $File "shadersystem.cpp"
  171. $File "texturemanager.cpp"
  172. $File "cmaterialsystem_ps3fonts.cpp" [$PS3]
  173. $File "composite_texture.cpp"
  174. $File "custom_material.cpp"
  175. $File "base_visuals_data_processor.cpp"
  176. $File "pch_materialsystem.cpp" [!$PS3]
  177. {
  178. $Configuration
  179. {
  180. $Compiler [!$LINUX && !$OSXALL]
  181. {
  182. $Create/UsePrecompiledHeader "Create Precompiled Header (/Yc)"
  183. }
  184. }
  185. }
  186. $File "cmaterialdict.cpp" \
  187. "cmaterialsystem.cpp" \
  188. "cmatlightmaps.cpp" \
  189. "cmatpaintmaps.cpp" \
  190. "cmatrendercontext.cpp" \
  191. "cmatqueuedrendercontext.cpp"
  192. }
  193. $Folder "Public Header Files"
  194. {
  195. $File "$SRCDIR\public\tier0\basetypes.h"
  196. $File "$SRCDIR\public\mathlib\bumpvects.h"
  197. $File "$SRCDIR\public\const.h"
  198. $File "$SRCDIR\public\tier1\convar.h"
  199. $File "$SRCDIR\public\crtmemdebug.h"
  200. $File "$SRCDIR\common\cstringhash.h"
  201. $File "$SRCDIR\public\filesystem.h"
  202. $File "$SRCDIR\public\appframework\iappsystem.h"
  203. $File "$SRCDIR\public\materialsystem\IColorCorrection.h"
  204. $File "$SRCDIR\public\materialsystem\imaterial.h"
  205. $File "$SRCDIR\public\materialsystem\imaterialproxy.h"
  206. $File "$SRCDIR\public\materialsystem\imaterialproxyfactory.h"
  207. $File "$SRCDIR\public\materialsystem\imaterialsystem.h"
  208. $File "$SRCDIR\public\materialsystem\imaterialsystemhardwareconfig.h"
  209. $File "$SRCDIR\public\materialsystem\imaterialsystemstub.h"
  210. $File "$SRCDIR\public\materialsystem\imaterialvar.h"
  211. $File "$SRCDIR\public\materialsystem\imesh.h"
  212. $File "$SRCDIR\public\materialsystem\imorph.h"
  213. $File "$SRCDIR\public\materialsystem\ipaintmapdatamanager.h"
  214. $File "$SRCDIR\public\tier1\interface.h"
  215. $File "$SRCDIR\public\materialsystem\IShader.h"
  216. $File "$SRCDIR\public\materialsystem\ishaderapi.h"
  217. $File "$SRCDIR\public\materialsystem\itexture.h"
  218. $File "$SRCDIR\public\materialsystem\ivisualsdataprocessor.h"
  219. $File "$SRCDIR\public\materialsystem\icustommaterial.h"
  220. $File "$SRCDIR\public\materialsystem\custommaterialowner.h"
  221. $File "$SRCDIR\public\materialsystem\icompositetexture.h"
  222. $File "$SRCDIR\public\materialsystem\icustommaterialmanager.h"
  223. $File "$SRCDIR\public\materialsystem\icompositetexturegenerator.h"
  224. $File "$SRCDIR\public\tier1\keyvalues.h"
  225. $File "$SRCDIR\public\materialsystem\materialsystem_config.h"
  226. $File "$SRCDIR\public\mathlib\mathlib.h"
  227. $File "$SRCDIR\public\tier1\mempool.h"
  228. $File "$SRCDIR\public\pixelwriter.h"
  229. $File "$SRCDIR\public\tier0\platform_override.h" [$PS3]
  230. $File "$SRCDIR\public\renderparm.h"
  231. $File "$SRCDIR\public\tier1\strtools.h"
  232. $File "$SRCDIR\public\tier1\utlbuffer.h"
  233. $File "$SRCDIR\public\tier1\utlmemory.h"
  234. $File "$SRCDIR\public\tier1\utlrbtree.h"
  235. $File "$SRCDIR\public\tier1\utlsymbol.h"
  236. $File "$SRCDIR\public\tier1\utlvector.h"
  237. $File "$SRCDIR\public\mathlib\vector.h"
  238. $File "$SRCDIR\public\mathlib\vector2d.h"
  239. $File "$SRCDIR\public\mathlib\vector4d.h"
  240. $File "$SRCDIR\public\mathlib\vmatrix.h"
  241. $File "$SRCDIR\public\mathlib\vplane.h"
  242. $File "$SRCDIR\public\vstdlib\vstdlib.h"
  243. $File "$SRCDIR\public\vtf\vtf.h"
  244. $File "$SRCDIR\public\materialsystem\base_visuals_data_processor.h"
  245. }
  246. $Folder "Header Files"
  247. {
  248. $File "cmaterial_queuefriendly.h"
  249. $File "cmaterialdict.h"
  250. $File "cmaterialsystem.h"
  251. $File "cmatlightmaps.h"
  252. $File "cmatnullrendercontext.h"
  253. $File "cmatpaintmaps.h"
  254. $File "cmatqueuedrendercontext.h"
  255. $File "cmatrendercontext.h"
  256. $File "colorspace.h"
  257. $File "IHardwareConfigInternal.h"
  258. $File "imagepacker.h"
  259. $File "imaterialinternal.h"
  260. $File "imaterialsysteminternal.h"
  261. $File "imatrendercontextinternal.h"
  262. $File "imorphinternal.h"
  263. $File "isubdinternal.h"
  264. $File "itextureinternal.h"
  265. $File "materialsystem_global.h"
  266. $File "occlusionquerymgr.h"
  267. $File "shader_dll_verify.h" [$WINDOWS]
  268. $File "shadersystem.h"
  269. $File "texturemanager.h"
  270. $File "shadersystem_ps3nonvirt.inl" [$PS3]
  271. $File "shaderutil_ps3nonvirt.h" [$PS3]
  272. $File "shaderutil_ps3nonvirt.inl" [$PS3]
  273. $File "composite_texture.h"
  274. $File "custom_material.h"
  275. }
  276. $Folder "Noninteractive Shaders" [$PS3]
  277. {
  278. $File "$SHADERAPIDX9DIR\..\ps3gcm\noninteractiveshader.fp"
  279. $File "$SHADERAPIDX9DIR\..\ps3gcm\noninteractiveshader.vp"
  280. $File "$SHADERAPIDX9DIR\..\ps3gcm\noninteractiveshaderstartup.fp"
  281. $File "$SHADERAPIDX9DIR\..\ps3gcm\noninteractiveshaderstartuppass2.fp"
  282. }
  283. $Folder "Link Libraries"
  284. {
  285. $Lib "bitmap"
  286. $Lib "mathlib"
  287. $Lib "shaderlib"[!$PS3 && !$OSXALL]
  288. $Lib "tier2"
  289. $Lib "tier3"
  290. $Lib "vtf"
  291. $Lib "videocfg" [$OSXALL]
  292. $ImplibExternal steam_api [ ( $WIN32 || $POSIX || $PS3 ) && !$NO_STEAM ]
  293. $ImplibExternal steam_api64 [ $WIN64 && !$NO_STEAM ]
  294. $Implib togl [!$IS_LIB_PROJECT && $GL && !$DEDICATED]
  295. }
  296. }