content.mak 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. NewNormalMap.pvr \
  34. Mountain.pvr \
  35. wood.pvr \
  36. sail.pvr \
  37. MountainFloor.pvr
  38. BIN_SHADERS = \
  39. FragShader.fsc \
  40. VertShader.vsc \
  41. SkyboxFShader.fsc \
  42. SkyboxVShader.vsc \
  43. ModelFShader.fsc \
  44. ModelVShader.vsc \
  45. Tex2DFShader.fsc \
  46. Tex2DVShader.vsc \
  47. PlaneTexFShader.fsc \
  48. PlaneTexVShader.vsc
  49. RESOURCES = \
  50. $(CONTENTDIR)/NewNormalMap.cpp \
  51. $(CONTENTDIR)/Mountain.cpp \
  52. $(CONTENTDIR)/wood.cpp \
  53. $(CONTENTDIR)/sail.cpp \
  54. $(CONTENTDIR)/MountainFloor.cpp \
  55. $(CONTENTDIR)/FragShader.cpp \
  56. $(CONTENTDIR)/VertShader.cpp \
  57. $(CONTENTDIR)/SkyboxFShader.cpp \
  58. $(CONTENTDIR)/SkyboxVShader.cpp \
  59. $(CONTENTDIR)/ModelFShader.cpp \
  60. $(CONTENTDIR)/ModelVShader.cpp \
  61. $(CONTENTDIR)/Tex2DFShader.cpp \
  62. $(CONTENTDIR)/Tex2DVShader.cpp \
  63. $(CONTENTDIR)/PlaneTexFShader.cpp \
  64. $(CONTENTDIR)/PlaneTexVShader.cpp \
  65. $(CONTENTDIR)/Scene.cpp
  66. all: resources
  67. help:
  68. @echo Valid targets are:
  69. @echo resources, textures, binary_shaders, clean
  70. @echo PVRTEXTOOL, FILEWRAP and PVRUNISCO can be used to override the default paths to these utilities.
  71. clean:
  72. -rm $(RESOURCES)
  73. -rm $(BIN_SHADERS)
  74. -rm $(TEXTURES)
  75. resources: $(CONTENTDIR) $(RESOURCES)
  76. textures: $(TEXTURES)
  77. binary_shaders: $(BIN_SHADERS)
  78. $(CONTENTDIR):
  79. -mkdir $@
  80. NewNormalMap.pvr: $(MEDIAPATH)/NewNormalMap.png
  81. $(PVRTEXTOOL) -b1.0 -m -fOGLPVRTC2 -i$(MEDIAPATH)/NewNormalMap.png -o$@
  82. Mountain.pvr: $(MEDIAPATH)/mountain1.png $(MEDIAPATH)/mountain2.png $(MEDIAPATH)/mountain3.png $(MEDIAPATH)/mountain4.png $(MEDIAPATH)/mountain5.png $(MEDIAPATH)/mountain6.png
  83. $(PVRTEXTOOL) -s -m -p -fOGLPVRTC4 -i$(MEDIAPATH)/mountain1.png -o$@
  84. wood.pvr: $(MEDIAPATH)/wood.png
  85. $(PVRTEXTOOL) -m -fOGLPVRTC2 -i$(MEDIAPATH)/wood.png -o$@
  86. sail.pvr: $(MEDIAPATH)/sail.png
  87. $(PVRTEXTOOL) -m -fOGLPVRTC2 -i$(MEDIAPATH)/sail.png -o$@
  88. MountainFloor.pvr: $(MEDIAPATH)/mountain6.png
  89. $(PVRTEXTOOL) -m -fOGLPVRTC2 -i$(MEDIAPATH)/mountain6.png -o$@
  90. $(CONTENTDIR)/NewNormalMap.cpp: NewNormalMap.pvr
  91. $(FILEWRAP) -o $@ NewNormalMap.pvr
  92. $(CONTENTDIR)/Mountain.cpp: Mountain.pvr
  93. $(FILEWRAP) -o $@ Mountain.pvr
  94. $(CONTENTDIR)/wood.cpp: wood.pvr
  95. $(FILEWRAP) -o $@ wood.pvr
  96. $(CONTENTDIR)/sail.cpp: sail.pvr
  97. $(FILEWRAP) -o $@ sail.pvr
  98. $(CONTENTDIR)/MountainFloor.cpp: MountainFloor.pvr
  99. $(FILEWRAP) -o $@ MountainFloor.pvr
  100. $(CONTENTDIR)/FragShader.cpp: FragShader.fsh FragShader.fsc
  101. $(FILEWRAP) -s -o $@ FragShader.fsh
  102. $(FILEWRAP) -oa $@ FragShader.fsc
  103. $(CONTENTDIR)/VertShader.cpp: VertShader.vsh VertShader.vsc
  104. $(FILEWRAP) -s -o $@ VertShader.vsh
  105. $(FILEWRAP) -oa $@ VertShader.vsc
  106. $(CONTENTDIR)/SkyboxFShader.cpp: SkyboxFShader.fsh SkyboxFShader.fsc
  107. $(FILEWRAP) -s -o $@ SkyboxFShader.fsh
  108. $(FILEWRAP) -oa $@ SkyboxFShader.fsc
  109. $(CONTENTDIR)/SkyboxVShader.cpp: SkyboxVShader.vsh SkyboxVShader.vsc
  110. $(FILEWRAP) -s -o $@ SkyboxVShader.vsh
  111. $(FILEWRAP) -oa $@ SkyboxVShader.vsc
  112. $(CONTENTDIR)/ModelFShader.cpp: ModelFShader.fsh ModelFShader.fsc
  113. $(FILEWRAP) -s -o $@ ModelFShader.fsh
  114. $(FILEWRAP) -oa $@ ModelFShader.fsc
  115. $(CONTENTDIR)/ModelVShader.cpp: ModelVShader.vsh ModelVShader.vsc
  116. $(FILEWRAP) -s -o $@ ModelVShader.vsh
  117. $(FILEWRAP) -oa $@ ModelVShader.vsc
  118. $(CONTENTDIR)/Tex2DFShader.cpp: Tex2DFShader.fsh Tex2DFShader.fsc
  119. $(FILEWRAP) -s -o $@ Tex2DFShader.fsh
  120. $(FILEWRAP) -oa $@ Tex2DFShader.fsc
  121. $(CONTENTDIR)/Tex2DVShader.cpp: Tex2DVShader.vsh Tex2DVShader.vsc
  122. $(FILEWRAP) -s -o $@ Tex2DVShader.vsh
  123. $(FILEWRAP) -oa $@ Tex2DVShader.vsc
  124. $(CONTENTDIR)/PlaneTexFShader.cpp: PlaneTexFShader.fsh PlaneTexFShader.fsc
  125. $(FILEWRAP) -s -o $@ PlaneTexFShader.fsh
  126. $(FILEWRAP) -oa $@ PlaneTexFShader.fsc
  127. $(CONTENTDIR)/PlaneTexVShader.cpp: PlaneTexVShader.vsh PlaneTexVShader.vsc
  128. $(FILEWRAP) -s -o $@ PlaneTexVShader.vsh
  129. $(FILEWRAP) -oa $@ PlaneTexVShader.vsc
  130. $(CONTENTDIR)/Scene.cpp: Scene.pod
  131. $(FILEWRAP) -o $@ Scene.pod
  132. FragShader.fsc: FragShader.fsh
  133. $(PVRUNISCO) FragShader.fsh $@ -f
  134. VertShader.vsc: VertShader.vsh
  135. $(PVRUNISCO) VertShader.vsh $@ -v
  136. SkyboxFShader.fsc: SkyboxFShader.fsh
  137. $(PVRUNISCO) SkyboxFShader.fsh $@ -f
  138. SkyboxVShader.vsc: SkyboxVShader.vsh
  139. $(PVRUNISCO) SkyboxVShader.vsh $@ -v
  140. ModelFShader.fsc: ModelFShader.fsh
  141. $(PVRUNISCO) ModelFShader.fsh $@ -f
  142. ModelVShader.vsc: ModelVShader.vsh
  143. $(PVRUNISCO) ModelVShader.vsh $@ -v
  144. Tex2DFShader.fsc: Tex2DFShader.fsh
  145. $(PVRUNISCO) Tex2DFShader.fsh $@ -f
  146. Tex2DVShader.vsc: Tex2DVShader.vsh
  147. $(PVRUNISCO) Tex2DVShader.vsh $@ -v
  148. PlaneTexFShader.fsc: PlaneTexFShader.fsh
  149. $(PVRUNISCO) PlaneTexFShader.fsh $@ -f
  150. PlaneTexVShader.vsc: PlaneTexVShader.vsh
  151. $(PVRUNISCO) PlaneTexVShader.vsh $@ -v
  152. ############################################################################
  153. # End of file (content.mak)
  154. ############################################################################