content.mak 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #--------------------------------------------------------------------------
  2. # Name : content.mak
  3. # Title : Makefile to build content files
  4. #
  5. # Copyright : Copyright (C) Imagination Technologies Limited.
  6. # : No part of this software, either material or conceptual
  7. # : may be copied or distributed, transmitted, transcribed,
  8. # : stored in a retrieval system or translated into any
  9. # : human or computer language in any form by any means,
  10. # : electronic, mechanical, manual or other-wise, or
  11. # : disclosed to third parties without the express written
  12. # : permission of VideoLogic Limited, Unit 8, HomePark
  13. # : Industrial Estate, King's Langley, Hertfordshire,
  14. # : WD4 8LZ, U.K.
  15. #
  16. # Description : Makefile to build content files for demos in the PowerVR SDK
  17. #
  18. # Platform :
  19. #
  20. #--------------------------------------------------------------------------
  21. #############################################################################
  22. ## Variables
  23. #############################################################################
  24. PVRTEXTOOL = ..\..\..\Utilities\PVRTexTool\PVRTexToolCL\Windows_x86_32\PVRTexTool.exe
  25. FILEWRAP = ..\..\..\Utilities\Filewrap\Windows_x86_32\Filewrap.exe
  26. PVRUNISCO = ..\..\..\Utilities\PVRUniSCo\OGLES\Windows_x86_32\PVRUniSCo_SGX53x.exe
  27. MEDIAPATH = ../Media
  28. CONTENTDIR = Content
  29. #############################################################################
  30. ## Instructions
  31. #############################################################################
  32. TEXTURES = \
  33. Mask.pvr \
  34. TableCover.pvr \
  35. Torus.pvr
  36. BIN_SHADERS = \
  37. FragShader.fsc \
  38. VertShader.vsc \
  39. ShadowFragShader.fsc \
  40. ShadowVertShader.vsc
  41. RESOURCES = \
  42. $(CONTENTDIR)/Scene.cpp \
  43. $(CONTENTDIR)/Mask.cpp \
  44. $(CONTENTDIR)/TableCover.cpp \
  45. $(CONTENTDIR)/Torus.cpp \
  46. $(CONTENTDIR)/FragShader.cpp \
  47. $(CONTENTDIR)/VertShader.cpp \
  48. $(CONTENTDIR)/ShadowFragShader.cpp \
  49. $(CONTENTDIR)/ShadowVertShader.cpp
  50. all: resources
  51. help:
  52. @echo Valid targets are:
  53. @echo resources, textures, binary_shaders, clean
  54. @echo PVRTEXTOOL, FILEWRAP and PVRUNISCO can be used to override the default paths to these utilities.
  55. clean:
  56. -rm $(RESOURCES)
  57. -rm $(BIN_SHADERS)
  58. -rm $(TEXTURES)
  59. resources: $(CONTENTDIR) $(RESOURCES)
  60. textures: $(TEXTURES)
  61. binary_shaders: $(BIN_SHADERS)
  62. $(CONTENTDIR):
  63. -mkdir $@
  64. Mask.pvr: $(MEDIAPATH)/Mask.png
  65. $(PVRTEXTOOL) -m -fOGLPVRTC4 -i$(MEDIAPATH)/Mask.png -o$@
  66. TableCover.pvr: $(MEDIAPATH)/TableCover.png
  67. $(PVRTEXTOOL) -m -fOGLPVRTC4 -i$(MEDIAPATH)/TableCover.png -o$@
  68. Torus.pvr: $(MEDIAPATH)/Torus.png
  69. $(PVRTEXTOOL) -m -fOGLPVRTC4 -i$(MEDIAPATH)/Torus.png -o$@
  70. $(CONTENTDIR)/Scene.cpp: Scene.pod
  71. $(FILEWRAP) -o $@ Scene.pod
  72. $(CONTENTDIR)/Mask.cpp: Mask.pvr
  73. $(FILEWRAP) -o $@ Mask.pvr
  74. $(CONTENTDIR)/TableCover.cpp: TableCover.pvr
  75. $(FILEWRAP) -o $@ TableCover.pvr
  76. $(CONTENTDIR)/Torus.cpp: Torus.pvr
  77. $(FILEWRAP) -o $@ Torus.pvr
  78. $(CONTENTDIR)/FragShader.cpp: FragShader.fsh FragShader.fsc
  79. $(FILEWRAP) -s -o $@ FragShader.fsh
  80. $(FILEWRAP) -oa $@ FragShader.fsc
  81. $(CONTENTDIR)/VertShader.cpp: VertShader.vsh VertShader.vsc
  82. $(FILEWRAP) -s -o $@ VertShader.vsh
  83. $(FILEWRAP) -oa $@ VertShader.vsc
  84. $(CONTENTDIR)/ShadowFragShader.cpp: ShadowFragShader.fsh ShadowFragShader.fsc
  85. $(FILEWRAP) -s -o $@ ShadowFragShader.fsh
  86. $(FILEWRAP) -oa $@ ShadowFragShader.fsc
  87. $(CONTENTDIR)/ShadowVertShader.cpp: ShadowVertShader.vsh ShadowVertShader.vsc
  88. $(FILEWRAP) -s -o $@ ShadowVertShader.vsh
  89. $(FILEWRAP) -oa $@ ShadowVertShader.vsc
  90. FragShader.fsc: FragShader.fsh
  91. $(PVRUNISCO) FragShader.fsh $@ -f
  92. VertShader.vsc: VertShader.vsh
  93. $(PVRUNISCO) VertShader.vsh $@ -v
  94. ShadowFragShader.fsc: ShadowFragShader.fsh
  95. $(PVRUNISCO) ShadowFragShader.fsh $@ -f
  96. ShadowVertShader.vsc: ShadowVertShader.vsh
  97. $(PVRUNISCO) ShadowVertShader.vsh $@ -v
  98. ############################################################################
  99. # End of file (content.mak)
  100. ############################################################################